hive icon indicating copy to clipboard operation
hive copied to clipboard

HIVE-28667: Error initializing field trimmer instance when starting HS2

Open zabetak opened this issue 6 months ago • 1 comments

What changes were proposed in this pull request?

  1. Change trimFields(JdbcRel) to trimFields(JdbcSort) to break the ambiguity and avoid the error.
  2. Make CalcitePlanner#HIVE_REL_NODE_CLASSES public 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

zabetak avatar Jun 17 '25 13:06 zabetak

The patch looks good to me, +1(non-biding).

ngsg avatar Jun 26 '25 09:06 ngsg

Many thanks for the reviews @ngsg @okumin !

zabetak avatar Jun 30 '25 08:06 zabetak