Skip to content

Fix leading CLI --conf properties being consumed by Hadoop - #3866

Open
zhangxinyao88 wants to merge 1 commit into
apache:masterfrom
zhangxinyao88:codex/parquet-cli-leading-conf
Open

zhangxinyao88 wants to merge 1 commit into
apache:masterfrom
zhangxinyao88:codex/parquet-cli-leading-conf

Conversation

@zhangxinyao88

Copy link
Copy Markdown
Contributor

A leading --conf key=value is consumed by Hadoop's ToolRunner as an XML resource option, so the command can succeed without applying the property. For example, parquet --conf parquet.avro.write-parquet-uuid=true convert ... writes a string column instead of UUID storage.

Normalize that alias to --property only within the leading Hadoop option prefix, then use the same entry path in Main and the shared CLI test helper. Preserve Hadoop's -conf XML resources, -D properties and generic option values; leave command arguments untouched. Explicit properties still override configuration-file values.

Fourteen regression cases cover configuration delivery, repeated properties, precedence, Hadoop options and argument values. Two launch the actual Main process and inspect the converted Parquet schema. Removing the fix produces ten assertion failures, including the UUID storage regression.

Validation: ./mvnw -o -B -ntp -pl parquet-cli spotless:check test passed on Java 17: 97 tests, 95 passed, 2 skipped; Spotless and RAT passed. Full-reactor and other-JDK checks were not run.

Related to #3283 and #3289. This is independent of the test-only conversion coverage in #3861.

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