Skip to content

[multistage] Type Inference for Case/When Has Some Issues #10415

@ankitsultana

Description

@ankitsultana

Detected this in #10409

There's a todo left in FunctionOperand as well related to this: https://github.com/apache/pinot/blob/master/pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/operands/FunctionOperand.java#L53

Essentially after the PR linked above, for the query below a couple of project nodes are merged and the case/when starts returning a Double at runtime which is compared against 16.0 which is a float.

SELECT intCol, CASE WHEN (SELECT SUM(floatCol) FROM {tbl1}) > 16.0 THEN 'Large sum' ELSE 'Small sum' END AS aggVal, strCol FROM {tbl1}

cc: @walterddr

Metadata

Metadata

Assignees

Labels

bugmulti-stageRelated to the multi-stage query engine

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions