Damiano
05/09/2020, 5:37 PMprotected IntermediateResultsBlock getNextBlock() <--- here?
Sidd
05/09/2020, 5:37 PMDamiano
05/09/2020, 5:38 PMSidd
05/09/2020, 5:38 PMDamiano
05/09/2020, 5:41 PMSidd
05/09/2020, 5:45 PM_initLock.lock();
try {
if (_dataSchema == null) {
_dataSchema = intermediateResultsBlock.getDataSchema();
_indexedTable = new ConcurrentIndexedTable(_dataSchema, _brokerRequest.getAggregationsInfo(),
_brokerRequest.getOrderBy(), _indexedTableCapacity);
}
} finally {
_initLock.unlock();
}
Damiano
05/09/2020, 5:45 PMSidd
05/09/2020, 5:47 PM_indexedTable.upsert(key, record);
Damiano
05/09/2020, 5:47 PMSidd
05/09/2020, 5:48 PMSELECT drawdown(id, amount) FROM table GROUP BY strategy_id ORDER BY drawdown(id, amount)
Damiano
05/09/2020, 5:50 PM} catch (Exception e) {
LOGGER.error("Exception processing CombineGroupByOrderBy for index {}, operator {}", index,
_operators.get(index).getClass().getName(), e);
mergedProcessingExceptions.add(QueryException.getException(QueryException.QUERY_EXECUTION_ERROR, e));
Sidd
05/09/2020, 5:51 PMSELECT drawdown(id, amount) FROM table GROUP BY strategy_id ORDER BY drawdown(id, amount)
Damiano
05/09/2020, 5:51 PMSidd
05/09/2020, 5:51 PMCould not find column drawdown(id,amount) in data schema <--
Damiano
05/09/2020, 5:52 PMSidd
05/09/2020, 5:52 PMDamiano
05/09/2020, 5:54 PMSidd
05/09/2020, 6:04 PMDamiano
05/09/2020, 6:09 PMif (columnIndexMap.containsKey(column)) {
int index = columnIndexMap.get(column);
if (index < numKeyColumns) {
_orderByValueExtractors[orderByIdx] = new KeyColumnExtractor(index);
} else {
AggregationFunction aggregationFunction = aggregationColumnToFunction.get(column);
_orderByValueExtractors[orderByIdx] = new AggregationColumnExtractor(index, aggregationFunction);
}
} else {
throw new IllegalStateException("Could not find column " + column + " in data schema");
}
if (columnIndexMap.containsKey(column)) <-- from here
Sidd
05/09/2020, 6:11 PMfor (int i = 0; i < numColumns; i++) {
String columnName = dataSchema.getColumnName(i);
columnIndexMap.put(columnName, i);
Damiano
05/09/2020, 6:13 PMSidd
05/09/2020, 6:14 PMDamiano
05/09/2020, 6:14 PMSidd
05/09/2020, 6:17 PMDamiano
05/09/2020, 6:18 PMSidd
05/09/2020, 6:19 PMDamiano
05/09/2020, 6:19 PM_dataSchema = intermediateResultsBlock.getDataSchema();
^ here right ?Sidd
05/09/2020, 6:20 PMString getResultColumnName();
Damiano
05/09/2020, 6:38 PMpublic String getResultColumnName() {
return getType().getName().toLowerCase() + "(" + _column + ")";
}
Sidd
05/09/2020, 6:38 PMDamiano
05/09/2020, 6:39 PMSidd
05/09/2020, 6:40 PMDamiano
05/09/2020, 6:41 PMSidd
05/09/2020, 6:41 PMDamiano
05/09/2020, 6:41 PMSidd
05/09/2020, 6:42 PMDamiano
05/09/2020, 6:42 PM"message": "QueryExecutionError:\njava.lang.ClassCastException: org.apache.pinot.core.query.aggregation.function.customobject.RangeSet cannot be cast to java.lang.Comparable\n\tat org.apache.pinot.core.data.table.TableResizer$AggregationColumnExtractor.lambda$new$0(TableResizer.java:311)\n\tat org.apache.pinot.core.data.table.TableResizer$AggregationColumnExtractor.extract(TableResizer.java:320)\n\tat org.apache.pinot.core.data.table.TableResizer.getIntermediateRecord(TableResizer.java:138)\n\tat org.apache.pinot.core.data.table.TableResizer.convertToIntermediateRecordsPQ(TableResizer.java:183)\n\tat org.apache.pinot.core.data.table.TableResizer.resizeRecordsMap(TableResizer.java:159)\n\tat org.apache.pinot.core.data.table.ConcurrentIndexedTable.resize(ConcurrentIndexedTable.java:141)\n\tat org.apache.pinot.core.data.table.ConcurrentIndexedTable.finish(ConcurrentIndexedTable.java:174)\n\tat org.apache.pinot.core.operator.CombineGroupByOrderByOperator.getNextBlock(CombineGroupByOrderByOperator.java:208)\n\tat org.apache.pinot.core.operator.CombineGroupByOrderByOperator.getNextBlock(CombineGroupByOrderByOperator.java:60)\n\tat org.apache.pinot.core.operator.BaseOperator.nextBlock(BaseOperator.java:49)\n\tat org.apache.pinot.core.operator.InstanceResponseOperator.getNextBlock(InstanceResponseOperator.java:37)\n\tat org.apache.pinot.core.operator.InstanceResponseOperator.getNextBlock(InstanceResponseOperator.java:26)\n\tat org.apache.pinot.core.operator.BaseOperator.nextBlock(BaseOperator.java:49)\n\tat org.apache.pinot.core.plan.GlobalPlanImplV0.execute(GlobalPlanImplV0.java:48)"
Sidd
05/09/2020, 7:06 PMDamiano
05/09/2020, 7:12 PM