ajantha-bhat 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_r407397937
 
 

 ##########
 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:
   can we make two methods ?
   `makeColumnExpression(l1)
   ``makeLiteralExpression(l1)`
   
   I see lot of duplicate code here

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

Reply via email to