924060929 opened a new pull request, #69387: URL: https://github.com/apache/doris/pull/69387
### What problem does this PR solve? Queries that assign an alias to a Hudi table fail during physical plan translation. The alias elimination rule calls `withTableAlias`, but `LogicalHudiScan` inherits the implementation that creates a generic `LogicalFileScan`, dropping the dedicated Hudi scan type and incremental read state. Override `withTableAlias` in `LogicalHudiScan` and retain the alias through all subsequent copies. This preserves the Hudi implementation path, partition selection, and relation-scoped read state. This fix targets branch-4.2 directly because master removed the dedicated Hudi scan classes in #64304. Branch-4.1 does not contain the alias propagation change and is unaffected by this bug. ### Release note Fix query planning failures when Hudi tables are referenced with table aliases. ### Check List (For Author) - Test: Added two FE unit tests. Both fail on the original implementation with `LogicalFileScan` instead of `LogicalHudiScan`; after the fix, all 12 tests in `LogicalHudiScanTest`, `LogicalFileScanTest`, and `PruneFileScanPartitionTest` pass using JDK 17 and `run-fe-ut.sh`. FE Checkstyle passes with zero violations. The external Hudi end-to-end regression suite was not run locally. - Behavior changed: Yes, aliased Hudi scans retain their scan type and read state instead of failing plan translation. - Does this need documentation: No -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
