Github user jackylk commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2180#discussion_r183211461
--- Diff:
datamap/lucene/src/main/java/org/apache/carbondata/datamap/lucene/LuceneFineGrainDataMap.java
---
@@ -157,6 +162,14 @@ private String getQueryString(Expression expression) {
return null;
}
+ //maximum records to return
+ if (strQuery.contains(",") && strQuery.indexOf(",") !=
strQuery.length() - 1) {
+ max_doc =
Integer.parseInt(strQuery.substring(strQuery.lastIndexOf(",") + 1).trim());
+ strQuery = strQuery.substring(0, strQuery.indexOf(","));
+ } else if (strQuery.contains(",") && strQuery.indexOf(",") ==
strQuery.length() - 1) {
+ strQuery = strQuery.substring(0, strQuery.indexOf(","));
--- End diff --
I am not sure why this if branch is needed
---