← Back to Pull requests

fix: filter columns by java field name for camel case field names #1130

Open
unknown opened this pull request with 427 lines diff across 5 files
View on GitHub
unknown unknown commented on Sep 23, 2026 01:28 UTC
Author

The column filter compared the name kept by the cglib bean map of a field with the field names configured through includeColumnFieldNames/excludeColumnFieldNames. For a field whose name starts with a lower case letter followed by an upper case letter, for example xRealIp or pName, the two names differ, so includeColumnFieldNames dropped the column and excludeColumnFieldNames kept it. The reorder by include list also assigned a position to an unknown column name, which shifted the following columns.

<!--
Thanks very much for contributing to Apache Fesod (Incubating)! Please make sure that your code changes
are covered with tests. And in case of new features or big changes
remember to adjust the documentation.## Purpose of the pull request

Closed: #1129

What's changed?

includeColumnFieldNames and excludeColumnFieldNames compare the configured names with FieldWrapper#getFieldName, which is the name kept by the cglib bean map of a field (FieldUtils#resolveCglibFieldName). For a field name that starts with a lower case letter followed by an upper case letter, for example xRealIp or pName, that name is XRealIp and PName, so the comparison never matches the Java field name the user configures:

includeColumnFieldNames(Arrays.asList("name", "xRealIp", "pName")) writes only the name column, the other two are dropped from the file, without any error.
excludeColumnFieldNames(Arrays.asList("xRealIp")) does not exclude the column.

The same name is used in ClassUtils#resortField, where every configured name took a position, so an unknown name left a hole and shifted the following columns when orderByIncludeColumn(true) is used.

The change uses the Java field name (field.getField().getName()) for the include/exclude check, and rebuilds the order from the include list by looking the field up by Java field name, skipping an unknown name so that it does not hold a column position. The cglib name is still used everywhere it is required, for example to read the value out of the bean map.

New unit tests cover field names of this shape for writing all columns, including a subset, excluding, an unknown name in the include list, and the same with orderByIncludeColumn(true). The test class fails on the current main branch (15 of 21 cases) and passes with the change.

Local verification with Temurin 1.8.0_472:

./mvnw clean package -B -Dmaven.test.skip=false -pl fesod-common,fesod-shaded,fesod-sheet -> 937 tests, 0 failures
./mvnw spotless:check -> Build success

Checklist

  • I have read the Contributor Guide.

  • I have written the necessary doc or comment.

  • I have added the necessary unit tests and all cases have passed.
  • Feel free to ping committers for the review!

    In case of an existing issue, reference it using one of the following:

    Closed: #ISSUE
    Related: #ISSUE

    -->

    Purpose of the pull request

    <!-- Describe the purpose of this pull request. For example: Closed: #ISSUE-->

    What's changed?

    <!--- Describe the change below, including rationale and design decisions -->

    Checklist

  • I have read the Contributor Guide.

  • I have written the necessary doc or comment.

  • I have added the necessary unit tests and all cases have passed.
  • Diff: 427 lines (+320 / -107) across 5 files Reviewer: BigDataDZ Review duration: 99528m
    All Vouch review confidence checks passed
    Residual risk 0.31 = Change Risk (0.52) × (1 − Review Confidence (0.41)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.52 · 427 lines diff across 5 files
    0.52
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    40%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.363
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #1130"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 40.9% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 52.1% (MEDIUM) · Higher = larger blast radius
    52.1%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 40.9% · Lower = rushed or shallow review
    40.9%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 30.8% · Safe to merge
    30.8%
    Repository