Skip to content

fix(schema): preserve quoted column name parts - #2735

Open
gudcks0305 wants to merge 1 commit into
JSQLParser:masterfrom
gudcks0305:codex/fix-column-quoted-names-2734
Open

gudcks0305 wants to merge 1 commit into
JSQLParser:masterfrom
gudcks0305:codex/fix-column-quoted-names-2734

Conversation

@gudcks0305

Copy link
Copy Markdown

Column(String) strips quoting from the complete qualified name before splitting it, corrupting individually quoted components:

new Column("t1.`id`").toString();
// Before: "t1"."`id"
// After:  t1.`id`

Split qualified names at dots outside quoted components and preserve each component's representation. Keep already-separated column components intact while retaining the existing BigQuery whole-quoted namespace behavior.

Regression coverage includes mixed quoting, quoted dots and escaped delimiters, constructor/setter paths and AST getters, splitting-off controls, PostgreSQL identifiers, and BigQuery namespaces.

Validation on macOS with JDK 17:

  • Regression tests fail on the unchanged upstream base, then pass with the fix.

  • Focused schema/PostgreSQL/BigQuery tests: 162 tests, zero failures/errors, one existing skip.

  • ./gradlew check --no-daemon --no-build-cache: 9,328 tests, zero failures/errors, 25 existing skips; grammar ambiguity, formatting, static analysis, and coverage checks pass.

  • mvn --batch-mode --no-transfer-progress -Dmaven.javadoc.disableNoFonts=false verify: 9,310 tests, zero failures/errors, 25 existing skips. Includes Javadoc generation; the CLI option is the JDK 17 workaround documented in the existing POM.

  • JMH 1.37, current-version SQL corpus: baseline and patch completed sequentially with three forks, two 10-second warmups and five 1-second measurements per fork. Results are mean ± 99.9% error, in ms/op:

    JDK 17 compiler mode Baseline Patch
    Default Graal 60.808 ± 31.867 213.767 ± 368.105
    C2 (-XX:-UseJVMCICompiler) 73.276 ± 37.797 86.913 ± 7.972

    Fork variation and overlapping intervals leave the performance comparison inconclusive. The C2 point estimate is 18.6% slower; these measurements do not establish either an improvement or absence of regression. A steadier environment is needed for a definitive comparison.

Validation used a temporary worktree at upstream commit 4acc89ff, with both changed files byte-identical to this commit, after slow build-artifact hashing in the Documents checkout.

AI assistance: implementation and independent review were performed with AI coding agents. The listed checks were executed locally.

Fixes #2734

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

net.sf.jsqlparser.schema.Column parse unexpected in 5.4

1 participant