hutiefang76 opened a new pull request, #4424: URL: https://github.com/apache/amoro/pull/4424
## Why are the changes needed? Fixes #4423. Generated table-operation history becomes invalid or changes values when properties/comments contain apostrophes or backslashes. Comment removal is emitted as the literal text `null`. ## Brief change log - Escape backslashes before apostrophes and preserve newline, carriage-return and tab characters with Spark literal escapes. - Apply escaping to property keys/values, removed property keys and column comments. - Emit an empty literal for comment removal. ## How was this patch tested? - [x] Added deterministic regression tests. - [x] Ran tests locally before making this pull request. - [ ] Screenshots (not applicable). JDK 17: 10 tests passed in `TestSparkMetadataChangeHandlerLiterals`, including two `DDLReverser` history cases. `./mvnw -pl amoro-common -am -Pskip-dashboard-build -Dtest=TestSparkMetadataChangeHandlerLiterals -Dsurefire.failIfNoSpecifiedTests=false test` A separate local Spark 3.5.8 Catalyst check parsed five representative escaped literal values and the generated DDL successfully; it is a parser check, not a running Spark cluster test. `dev/reformat` passed. Uses Spark's default string-literal parsing. No identifier-quoting or nullability change is included; literal tests use a distinct class to avoid a file-addition conflict with the nullability fix. ## Documentation - Does this pull request introduce a new feature? No. - Feature documentation: not applicable; this corrects existing behavior. AI assistance: DeepSeek and Codex assisted implementation, tests and this description. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
