You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by GitBox <gi...@apache.org> on 2020/04/13 10:01:31 UTC

[GitHub] [carbondata] kunal642 commented on a change in pull request #3705: [CARBONDATA-3771] Fixed date filter issue and use hive constants instead of hard-coded …

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:
users@infra.apache.org


With regards,
Apache Git Services