Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
4.0.0
Description
In cases like Query89, the vertex with the filter is not vectorized.
Filter Operator predicate: CASE WHEN ((avg_window_0 <> 0.0D)) THEN (((abs((_col6 - avg_window_0)) / avg_window_0) > 0.1D)) ELSE (null) END (type: boolean)
Reducer 3 Execution mode: llap Reduce Vectorization: enabled: true enableConditionsMet: hive.vectorized.execution.reduce.enabled IS true, hive.execution.engine tez IN [tez, spark] IS true notVectorizedReason: FILTER operator: Unexpected hive type name void vectorized: false
The query specifically has
where case when (avg_monthly_sales <> 0) then (abs(sum_sales - avg_monthly_sales) / avg_monthly_sales) else null end > 0.1
while rewriting it to
where case when (avg_monthly_sales <> 0) then (abs(sum_sales - avg_monthly_sales) / avg_monthly_sales) > 0.1 else false end
does vectorize into
Filter Operator Filter Vectorization: className: VectorFilterOperator native: true predicateExpression: SelectColumnIsTrue(col 12:boolean)(children: VectorUDFAdaptor(CASE WHEN ((avg_window_0 <> 0.0D)) THEN (((abs((_col6 - avg_window_0)) / avg_window_0) > 0.1D)) ELSE (false) END)(children: DoubleColNotEqualDoubleScalar(col 7:double, val 0.0) -> 8:boolean, DoubleColGreaterDoubleScalar(col 9:double, val 0.1)(children: DoubleColDivideDoubleColumn(col 10:double, col 7:double)(children: FuncAbsDoubleToDouble(col 9:double)(children: DoubleColSubtractDoubleColumn(col 6:double, col 7:double) -> 9:double) -> 10:double) -> 9:double) -> 11:boolean) -> 12:boolean) predicate: CASE WHEN ((avg_window_0 <> 0.0D)) THEN (((abs((_col6 - avg_window_0)) / avg_window_0) > 0.1D)) ELSE (false) END (type: boolean) Statistics: Num rows: 11 Data size: 5291 Basic stats: COMPLETE Column stats: COMPLETE
Attachments
Attachments
Issue Links
- links to