[GitHub] kevinjmh commented on a change in pull request #3109: [CARBONDATA-3278] Remove duplicate code to get filter string of date/timestamp

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] kevinjmh commented on a change in pull request #3109: [CARBONDATA-3278] Remove duplicate code to get filter string of date/timestamp

GitBox
kevinjmh 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_r251714738
 
 

 ##########
 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:
   The motivation for this PR is exactly for DATE and TIMESTAMP. You can check detail implementaion in that method

----------------------------------------------------------------
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:
[hidden email]


With regards,
Apache Git Services