kunal642 commented on a change in pull request #3705: [CARBONDATA-3771] Fixed
date filter issue and use hive constants instead of hard-coded …
URL: https://github.com/apache/carbondata/pull/3705#discussion_r407409308
##########
File path:
integration/hive/src/main/java/org/apache/carbondata/hive/Hive2CarbonExpression.java
##########
@@ -103,38 +111,43 @@ public static Expression
convertExprHive2Carbon(ExprNodeDesc exprNodeDesc) {
getDateType(l1.get(left).getTypeString()));
}
LiteralExpression literalExpression =
- new LiteralExpression(l1.get(right).getExprString().replace("'",
""),
+ new LiteralExpression(getExpressionValue(l1.get(right)),
getDateType(l1.get(right).getTypeString()));
return new EqualToExpression(columnExpression, literalExpression);
} else if (udf instanceof GenericUDFOPEqualOrGreaterThan) {
ColumnExpression columnExpression = new
ColumnExpression(l1.get(left).getCols().get(left),
getDateType(l1.get(left).getTypeString()));
- LiteralExpression literalExpression = new
LiteralExpression(l1.get(right).getExprString(),
- getDateType(l1.get(left).getTypeString()));
+ LiteralExpression literalExpression =
Review comment:
i dont think its good, we would just be replacing 1 line code with a method
call.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services