tanishq-chugh commented on code in PR #6366:
URL: https://github.com/apache/hive/pull/6366#discussion_r3077503533


##########
ql/src/test/queries/clientpositive/cast_decimal_vectorized.q:
##########
@@ -0,0 +1,9 @@
+CREATE TABLE test_stats0 (e decimal(38,10)) stored as orc;
+insert into test_stats0 (e) values (0.0);
+
+set hive.vectorized.execution.enabled=false;
+select count(*) from test_stats0 where CAST(e as DECIMAL(15,1)) BETWEEN 100.0 
AND 1000.0;
+
+
+set hive.vectorized.execution.enabled=true;
+select count(*) from test_stats0 where CAST(e as DECIMAL(15,1)) BETWEEN 100.0 
AND 1000.0;

Review Comment:
   Yes. Have added the same in commit - 
[78bcca6](https://github.com/apache/hive/pull/6366/commits/78bcca6c723365672520d197f3f34723dcf04e19)
   
   The only difference in `EXPLAIN VECTORIZATION DETAIL` with and without this 
patch lies in the predicateExpression. 
   
   Without this patch, predicateExpression is:
   `predicateExpression: FilterDecimal64ColumnBetween(col 
3:decimal(15,1)/DECIMAL_64, decimal64LeftVal 1000, decimalLeftVal 1000, 
decimal64RightVal 10000, decimalRightVal 10000)(children: 
CastDecimalToDecimal(col 0:decimal(38,10)) -> 3:decimal(15,1))`
   
   With this patch, predicateExpression is:
   `predicateExpression: FilterDecimalColumnBetween(col 3:decimal(15,1), left 
100, right 1000)(children: CastDecimalToDecimal(col 0:decimal(38,10)) -> 
3:decimal(15,1))`



-- 
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]

Reply via email to