Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -424,11 +424,15 @@ public static TableAccumulator createBuiltinMultiInputAccumulator(
TAggregationType aggregationType, List<TSDataType> inputDataTypes) {
switch (aggregationType) {
case MAX_BY:
checkState(inputDataTypes.size() == 2, "Wrong inputDataTypes size.");
// return new MaxByAccumulator(inputDataTypes.get(0), inputDataTypes.get(1));
{
checkState(inputDataTypes.size() == 2, "Wrong inputDataTypes size.");
// return new MaxByAccumulator(inputDataTypes.get(0), inputDataTypes.get(1));
}
case MIN_BY:
checkState(inputDataTypes.size() == 2, "Wrong inputDataTypes size.");
// return new MinByAccumulator(inputDataTypes.get(0), inputDataTypes.get(1));
{
checkState(inputDataTypes.size() == 2, "Wrong inputDataTypes size.");
// return new MinByAccumulator(inputDataTypes.get(0), inputDataTypes.get(1));
}
default:
throw new IllegalArgumentException("Invalid Aggregation function: " + aggregationType);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,7 @@ private void updateX(int groupId, Column xColumn, int xIndex) {
break;
case BOOLEAN:
xBooleanValues.set(groupId, xColumn.getBoolean(xIndex));
break;
default:
throw new UnSupportedDataTypeException(
String.format("Unsupported data type in MAX_BY/MIN_BY Aggregation: %s", xDataType));
Expand Down
Comment thread
anukalp2804 marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -200,36 +200,47 @@ private static long shortHash64(byte[] data, int offset, int length, long seed)
switch (remainder) {
case 15:
h3 += (data[current + 14] & 0xFFL) << 48;
// fall through
case 14:
h3 += (data[current + 13] & 0xFFL) << 40;
// fall through
case 13:
h3 += (data[current + 12] & 0xFFL) << 32;
// fall through
case 12:
h3 += getUnsignedIntFromBytesWithLittleEndian(data, current + 8);
h2 += getLongFromBytesWithLittleEndian(data, current);
break;
case 11:
h3 += (data[current + 10] & 0xFFL) << 16;
// fall through
case 10:
h3 += (data[current + 9] & 0xFFL) << 8;
// fall through
case 9:
h3 += (data[current + 8] & 0xFFL);
// fall through
case 8:
h2 += getLongFromBytesWithLittleEndian(data, current);
break;
case 7:
h2 += (data[current + 6] & 0xFFL) << 48;
// fall through
case 6:
h2 += (data[current + 5] & 0xFFL) << 40;
// fall through
case 5:
h2 += (data[current + 4] & 0xFFL) << 32;
// fall through
case 4:
h2 += getUnsignedIntFromBytesWithLittleEndian(data, current);
break;
case 3:
h2 += (data[current + 2] & 0xFFL) << 16;
// fall through
case 2:
h2 += (data[current + 1] & 0xFFL) << 8;
// fall through
case 1:
h2 += (data[current] & 0xFFL);
break;
Expand Down Expand Up @@ -389,26 +400,37 @@ private static long longHash64(byte[] data, int offset, int length, long seed) {
switch (sequences) {
case 11:
h10 += getLongFromBytesWithLittleEndian(data, current + 10 * SIZE_OF_LONG);
// fall through
case 10:
h9 += getLongFromBytesWithLittleEndian(data, current + 9 * SIZE_OF_LONG);
// fall through
case 9:
h8 += getLongFromBytesWithLittleEndian(data, current + 8 * SIZE_OF_LONG);
// fall through
case 8:
h7 += getLongFromBytesWithLittleEndian(data, current + 7 * SIZE_OF_LONG);
// fall through
case 7:
h6 += getLongFromBytesWithLittleEndian(data, current + 6 * SIZE_OF_LONG);
// fall through
case 6:
h5 += getLongFromBytesWithLittleEndian(data, current + 5 * SIZE_OF_LONG);
// fall through
case 5:
h4 += getLongFromBytesWithLittleEndian(data, current + 4 * SIZE_OF_LONG);
// fall through
case 4:
h3 += getLongFromBytesWithLittleEndian(data, current + 3 * SIZE_OF_LONG);
// fall through
case 3:
h2 += getLongFromBytesWithLittleEndian(data, current + 2 * SIZE_OF_LONG);
// fall through
case 2:
h1 += getLongFromBytesWithLittleEndian(data, current + SIZE_OF_LONG);
// fall through
case 1:
h0 += getLongFromBytesWithLittleEndian(data, current);
// fall through
case 0:
break;
default:
Expand All @@ -422,18 +444,25 @@ private static long longHash64(byte[] data, int offset, int length, long seed) {
switch (limit - current) {
case 7:
last |= (data[current + 6] & 0xFFL) << 48;
// fall through
case 6:
last |= (data[current + 5] & 0xFFL) << 40;
// fall through
case 5:
last |= (data[current + 4] & 0xFFL) << 32;
// fall through
case 4:
last |= (data[current + 3] & 0xFFL) << 24;
// fall through
case 3:
last |= (data[current + 2] & 0xFFL) << 16;
// fall through
case 2:
last |= (data[current + 1] & 0xFFL) << 8;
// fall through
case 1:
last |= (data[current] & 0xFFL);
// fall through
case 0:
break;
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,10 +418,12 @@ public TSStatus executeNonQueryPlan(ConfigPhysicalPlan physicalPlan)
return clusterSchemaInfo.adjustMaxRegionGroupCount(
(AdjustMaxRegionGroupNumPlan) physicalPlan);
case DeleteDatabase:
try {
return clusterSchemaInfo.deleteDatabase((DeleteDatabasePlan) physicalPlan);
} finally {
partitionInfo.deleteDatabase((DeleteDatabasePlan) physicalPlan);
{
try {
return clusterSchemaInfo.deleteDatabase((DeleteDatabasePlan) physicalPlan);
} finally {
partitionInfo.deleteDatabase((DeleteDatabasePlan) physicalPlan);
}
}
case PreDeleteDatabase:
return partitionInfo.preDeleteDatabase((PreDeleteDatabasePlan) physicalPlan);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ protected Flow executeFromState(ConfigNodeProcedureEnv env, RemoveDataNodeState
removedDataNodes);
return Flow.NO_MORE_STATE;
}
break;
case REMOVE_DATA_NODE_PREPARE:
Map<Integer, NodeStatus> removedNodeStatusMap = new HashMap<>();
removedDataNodes.forEach(
Expand Down
Loading