Steve Carlin has uploaded a new patch set (#2). ( http://gerrit.cloudera.org:8080/22024 )
Change subject: IMPALA-13482: Bug fixes for lag/coalesce in analytic function. ...................................................................... IMPALA-13482: Bug fixes for lag/coalesce in analytic function. The following SQL query in analytics.test ... select lag(coalesce(505, 1 + NULL), 1) over (order by int_col desc) from alltypestiny ... had a couple of issues 1) The coalesce function needed a special operator. This function derives its return type from a common type that works for all parameters. 2) The function was not being saved when being reset. This is needed for when resetAnalysisState is called. 3) createNullLiteral needed to be overriden for similar reasons. The null literal type needs to be saved for when resetAnalysisState is called. Change-Id: Ic54d955a73cec4b5f421099a74df4172a1b7dd8b --- M java/calcite-planner/src/main/java/org/apache/impala/calcite/functions/AnalyzedAnalyticExpr.java M java/calcite-planner/src/main/java/org/apache/impala/calcite/functions/AnalyzedFunctionCallExpr.java A java/calcite-planner/src/main/java/org/apache/impala/calcite/operators/ImpalaCoalesceFunction.java M java/calcite-planner/src/main/java/org/apache/impala/calcite/operators/ImpalaCustomOperatorTable.java M java/calcite-planner/src/main/java/org/apache/impala/calcite/operators/ImpalaOperatorTable.java 5 files changed, 65 insertions(+), 2 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/24/22024/2 -- To view, visit http://gerrit.cloudera.org:8080/22024 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic54d955a73cec4b5f421099a74df4172a1b7dd8b Gerrit-Change-Number: 22024 Gerrit-PatchSet: 2 Gerrit-Owner: Steve Carlin <[email protected]>
