hive
hive copied to clipboard
HIVE-28667: Error initializing field trimmer instance when starting HS2
What changes were proposed in this pull request?
- Change
trimFields(JdbcRel)totrimFields(JdbcSort)to break the ambiguity and avoid the error. - Make
CalcitePlanner#HIVE_REL_NODE_CLASSESpublic mainly to facilitate testing. In fact, it makes sense to expose this information somewhere so why not in CalcitePlanner.
Why are the changes needed?
Avoid the ambiguity exception during HS2 startup. For more details see commit message or HIVE-28667.
Does this PR introduce any user-facing change?
No. There is no change in behavior since anyways the trimmer cannot be called with a JdbcSort operator.
How was this patch tested?
mvn test -Dtest=TestHiveRelFieldTrimmer -pl ql
mvn test -Dtest=TestMiniLlapLocalCliDriver -Dqfile_regex=".*jdbc.*" -pl itests/qtest -Pitests
The patch looks good to me, +1(non-biding).
Quality Gate passed
Issues
2 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Many thanks for the reviews @ngsg @okumin !