manishnalla1994 commented on a change in pull request #3182: [CARBONDATA-3343] Compaction for Range Sort
URL:
https://github.com/apache/carbondata/pull/3182#discussion_r277979622
##########
File path: processing/src/main/java/org/apache/carbondata/processing/merger/CarbonCompactionUtil.java
##########
@@ -460,6 +473,71 @@ public static boolean isRestructured(List<DataFileFooter> listMetadata,
return false;
}
+ public static RangeValues[] getRangesFromVals(Object[] tempRanges, Object[] startAndEnd) {
+ RangeValues[] ranges = new RangeValues[tempRanges.length + 1];
+ Object lastStart = startAndEnd[0];
+ for (int i = 0; i < tempRanges.length; i++) {
+ ranges[i] = new RangeValues(lastStart, tempRanges[i]);
+ lastStart = tempRanges[i];
+ }
+ ranges[tempRanges.length] = new RangeValues(lastStart, startAndEnd[1]);
+ return ranges;
+ }
+
+ public static Expression getAndExpressionForRange(String colName, int taskId, byte[] minVal,
+ byte[] maxVal, DataType dataType) {
+ Expression finalExpr;
+ Expression exp1, exp2;
+ Object currMinVal = null, currMaxVal = null;
+ if (dataType == DataTypes.STRING) {
Review comment:
Added the testcase for it.
----------------------------------------------------------------
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:
[hidden email]
With regards,
Apache Git Services