Caideyipi opened a new pull request, #18911: URL: https://github.com/apache/iotdb/pull/18911
## Description `SHOW CREATE VIEW` removes every tree-model backtick from its source path. A view over a node containing an escaped backtick can therefore be recreated on a different node (`ab`), while spaces and double quotes can produce invalid DDL. Preserve the canonical tree-path nodes and quote them with the existing identifier escaping helper. This also fixes `SHOW CREATE TABLE` on tree views. Numeric nodes now retain their tree-model quotes in the generated DDL. Add nine parameterized cases checking the generated SQL and reparsed source path. Add an integration regression that recreates views from both SHOW CREATE commands and checks their data, including a separate `ab` source containing `999` to detect accidental redirection. ## Validation - Regression comparison: the original implementation fails 8 of 9 cases; the fix passes all 9. - Full reactor English `test-compile` with `with-integration-tests`: passed. - `ShowCreateViewTaskTest` and `CreateViewPrefixPathTest`: 10 tests passed. - `IoTDBTableIT#testShowCreateViewPreservesQuotedTreePath+testTreeViewTable` with `TableSimpleIT`: 2 tests passed on 1 ConfigNode and 1 DataNode. - Spotless and Checkstyle for the changed Java files: passed. - Full reactor Chinese `test-compile` with `with-zh-locale,with-integration-tests`: passed. The integration verification used: ```shell mvn verify -pl integration-test -am -P TableSimpleIT,with-integration-tests -Dtest=ShowCreateViewTaskTest,CreateViewPrefixPathTest -Dsurefire.failIfNoSpecifiedTests=false '-Dit.test=IoTDBTableIT#testShowCreateViewPreservesQuotedTreePath+testTreeViewTable' -Dfailsafe.failIfNoSpecifiedTests=false -DfailIfNoTests=false -Drat.skip=true -Dmaven.compiler.useIncrementalCompilation=false ``` RAT was skipped because the existing Go submodule has five files without approved license headers. The new Java test includes the Apache license header. This PR has: - [x] been self-reviewed. - [x] added unit tests. - [x] added integration tests. - [x] been tested in a test IoTDB cluster. -- 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]
