ggangadharan opened a new pull request, #6402: URL: https://github.com/apache/hive/pull/6402
### What changes were proposed in this pull request? Update **HiveFunctionHelper.checkForStatefulFunctions()** to not assert when it encounters Calciteās internal operator **COMPONENT_ACCESS** (used for nested field access on collections). Instead, it treats it as non-stateful and continues traversing operands ### Why are the changes needed? Queries can compile into Calcite Rex trees that include **COMPONENT_ACCESS**, but checkForStatefulFunctions() currently assumes every RexCall maps to a Hive GenericUDF. COMPONENT_ACCESS has **no Hive UDF mapping**, so the code throws an **AssertionError**, causing query compilation failure (HS2 surfaces it as HiveSQLException). ### Does this PR introduce _any_ user-facing change? No Queries that previously failed at compile time with an AssertionError (for nested column access on arrays/structs under CBO) will compile and run normally. No new syntax, configs, or behavioral change beyond removing the erroneous failure; stateful-function detection remains intact because the walker still visits operands. ### How was this patch tested? JUnit: TestHiveFunctionHelper#testCoalesceWithComponentAccessDoesNotAssert (module ql). QTest: cbo_component_access_nvl.q -- 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]
