dhatchayani commented on a change in pull request #3109: [CARBONDATA-3278] 
Remove duplicate code to get filter string of date/timestamp
URL: https://github.com/apache/carbondata/pull/3109#discussion_r251710015
 
 

 ##########
 File path: 
datamap/bloom/src/main/java/org/apache/carbondata/datamap/bloom/BloomCoarseGrainDataMap.java
 ##########
 @@ -358,11 +326,12 @@ private BloomQueryModel 
buildQueryModelForIn(ColumnExpression ce, ListExpression
 
   private byte[] getInternalFilterValue(CarbonColumn carbonColumn, 
LiteralExpression le) throws
       DictionaryGenerationException, UnsupportedEncodingException {
-    Object filterLiteralValue = getLiteralExpValue(le);
     // convert the filter value to string and apply converters on it to get 
carbon internal value
     String strFilterValue = null;
-    if (null != filterLiteralValue) {
-      strFilterValue = String.valueOf(filterLiteralValue);
+    try {
+      strFilterValue = le.getExpressionResult().getString();
 
 Review comment:
   @kevinjmh can you please check for DATE and TIMESTAMP data type. As we 
expect DATE and TIMESTAMP value in Long type as filterValue and then we make 
StringValue out of that.
   
   le.getExpressionResult().getString() ==> what string value this return for 
DATE and TIMESTAMP value?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to