ggangadharan commented on code in PR #6946:
URL: https://github.com/apache/hive/pull/6946#discussion_r4702939580
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/ptf/VectorPTFOperator.java:
##########
@@ -325,6 +325,8 @@ protected void initializeOp(Configuration hconf) throws
HiveException {
evaluators = VectorPTFDesc.getEvaluators(vectorDesc, vectorPTFInfo);
for (VectorPTFEvaluatorBase evaluator : evaluators) {
evaluator.setNullsLast(HiveConf.getBoolVar(hconf,
HiveConf.ConfVars.HIVE_DEFAULT_NULLS_LAST));
+ // Evaluated in process(), which needs its transient state (e.g. a
cast's target type).
+ VectorExpression.doTransientInit(evaluator.inputVecExpr, hconf);
Review Comment:
Thanks, agreed.
opened HIVE-30280 for it and linked it as "is fixed by" HIVE-30162. The code
matches , from 4.0.0 to 4.2.1, VectorPTFOperator never transient-initializes
the evaluator input expressions, and CastStringToLong depends on that. 3.1.x
isn't affected the same way. Validated the repro in the JIRA against this
branch: with the one-line fix removed, sum(cast(s as int)) is NULL for every
row; with it, the result matches row mode.
The user-facing section of the description is also updated.
--
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]