Skip to content
Merged
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 @@ -494,6 +494,7 @@ private Slice getSlice(int rowIndex, int columnIndex)
String[] stringArray = currentDataTable.getDataTable().getStringArray(rowIndex, columnIndex);
return utf8Slice(Arrays.toString(stringArray));
case STRING:
case JSON:
String field = currentDataTable.getDataTable().getString(rowIndex, columnIndex);
if (field == null || field.isEmpty()) {
return Slices.EMPTY_SLICE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import com.facebook.airlift.log.Logger;
import com.facebook.presto.common.type.BigintType;
import com.facebook.presto.common.type.FixedWidthType;
import com.facebook.presto.common.type.JsonType;
import com.facebook.presto.common.type.TypeManager;
import com.facebook.presto.common.type.VarcharType;
import com.facebook.presto.pinot.PinotColumnHandle;
Expand Down Expand Up @@ -499,7 +500,7 @@ public PinotQueryGeneratorContext visitAggregation(AggregationNode node, PinotQu
case GROUP_BY: {
GroupByColumnNode groupByColumn = (GroupByColumnNode) expression;
VariableReferenceExpression groupByInputColumn = getVariableReference(groupByColumn.getInputColumn());
checkState(groupByInputColumn.getType() instanceof FixedWidthType || groupByInputColumn.getType() instanceof VarcharType);
checkState(groupByInputColumn.getType() instanceof FixedWidthType || groupByInputColumn.getType() instanceof VarcharType || groupByInputColumn.getType() instanceof JsonType);
variablesInAggregation.add(groupByInputColumn);
break;
}
Expand Down