test(csvim): quote identifiers so CSVIM ITs pass on PostgreSQL - #6701
Merged
delchev merged 1 commit intoAug 13, 2026
Merged
Conversation
CsvProcessorIT and CsvimReimportIT create their fixture tables with unquoted DDL (CREATE TABLE CSV_A ...) and then look them up by the literal uppercase name with a null schema. Unquoted identifiers fold to UPPERCASE on H2 but to lowercase on PostgreSQL, and DatabaseNameNormalizer does not fold case, so the metadata lookup in CsvimProcessor.process misses on the PostgreSQL CI leg and throws "Table metadata was not found for table [CSV_A] in schema [null]" (5 failures once eclipse-dirigible#6684 wired these previously-never-executed ITs in). Quote the table and column identifiers in the DDL/DML so both databases store them in the same case, matching the uppercase name passed to CsvFile and the uppercase CSV headers. This mirrors how the real .table synchronizer path stores identifiers and the convention already used by every other JDBC-style IT (DatabaseCrudNullValuesIT, SchemaRepublishTypeToleranceIT, NumberingSdkIT). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
masteris red on theintegration-tests-postgresqlleg: 5 failures inCsvProcessorITandCsvimReimportIT, e.g.These two ITs were compiled but never actually executed until #6684 wired them into the suite, which exposed a pre-existing H2-only assumption on the PostgreSQL leg.
Root cause
Both tests create their fixture tables with unquoted DDL (
CREATE TABLE CSV_A ...) and then look them up by the literal uppercase name with a null schema. Unquoted identifiers fold to UPPERCASE on H2 but to lowercase on PostgreSQL, andDatabaseNameNormalizer.normalizeTableNameonly strips quotes — it does not fold case. So on PostgreSQL the metadata lookup inCsvimProcessor.process(viaCsvimUtils.getTableMetadata→DatabaseMetadataHelper.describeTable) misses the lowercase-stored table and throws. Theexpected: <2> but was: <0>variants are the non-strict form of the same miss (0 rows imported).Fix
Quote the table and column identifiers in the DDL/DML so both databases store them in the same case, matching the uppercase name passed to
CsvFileand the uppercase CSV headers. This mirrors how the real.tablesynchronizer path stores identifiers and the convention already used by every other JDBC-style IT in the suite (DatabaseCrudNullValuesIT,SchemaRepublishTypeToleranceIT,NumberingSdkIT, and the passing sibling test inCsvimReimportITitself).Test-only change; no production code touched.
Verification
Analysis-verified. I could not run the PostgreSQL leg locally (no Docker), so it has not yet been run-verified against PostgreSQL 16.
Note: the
integration-tests-h2leg on the same failing run hit the 2h30m max-execution-time cap (a hang), which is a separate issue this PR does not address.🤖 Generated with Claude Code