Skip to content

fix(cpp): reject UTF-8 name collisions before CLI output - #1002

Merged
ColinLeeo merged 1 commit into
apache:developfrom
ColinLeeo:colin/fix-cli-utf8-name-collisions
Oct 10, 2026
Merged

ColinLeeo merged 1 commit into
apache:developfrom
ColinLeeo:colin/fix-cli-utf8-name-collisions

Conversation

@ColinLeeo

@ColinLeeo ColinLeeo commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

UTF-8 replacement can make distinct TsFile identifiers render as the same name. The CLI previously rejected only some NDJSON header collisions, returned exit code 3 for row queries, and could miss collisions in metadata, CSV/table output, or empty query results. Multi-object export could also create its destination before detecting a later object's collision.

This change makes name collisions consistently return exit code 2 before writing stdout or creating export files/directories:

  • Share normalized-name validation across output formats and preflight names in ls, schema, count, stats, head, cat, and export.
  • Validate the selected schema before time/row filters, including empty results, and check merged TAG headers in table statistics.
  • Validate every selected export object before opening output files or creating the destination directory, preserving existing targets with --force.
  • Keep valid projections and independent column scopes working, including repeated metadata names belonging to the same original object.

Follow-up for #997.

Validation:

  • All 225 C++ CLI tests in 22 suites passed, including the new UTF-8 collision regression matrix and existing golden-output tests.
  • 90 standalone CLI fixture probes passed (exit code 2 and empty stdout).
  • ./mvnw -o spotless:check -P with-cpp passed.
  • git diff --check passed.

@ColinLeeo
ColinLeeo merged commit 01c3fe3 into apache:develop Oct 10, 2026
50 of 52 checks passed
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.

1 participant