xiangfu0 commented on code in PR #19986:
URL: https://github.com/apache/pinot/pull/19986#discussion_r4347103210
##########
pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/AggregationFunctionType.java:
##########
@@ -426,6 +427,43 @@ public static AggregationFunctionType
getAggregationFunctionType(String function
}
}
+ /// Accepts `(dataColumn, timeColumn)` and `(dataColumn, timeColumn,
'dataType')`. The two-argument form is limited to
+ /// the types of the explicit form, since its data type argument is inferred
from the data argument.
+ private static class ValueWithTimeOperandTypeChecker implements
SqlOperandTypeChecker {
+ private static final SqlOperandTypeChecker DELEGATE = OperandTypes.or(
+ OperandTypes.family(SqlTypeFamily.ANY, SqlTypeFamily.ANY),
+ OperandTypes.family(SqlTypeFamily.ANY, SqlTypeFamily.ANY,
SqlTypeFamily.CHARACTER));
+ private static final Set<SqlTypeName> INFERRED_DATA_TYPES =
Set.of(SqlTypeName.TINYINT, SqlTypeName.SMALLINT,
Review Comment:
There are now three type lists that have to stay in agreement: this
validation set, the rule's getDataTypeArgument switch, and the single-stage
addDataTypeArgument switch. A short comment pointing at the other two would
help whoever adds the next supported type keep them aligned.
##########
pinot-query-runtime/src/test/resources/queries/UDFAggregates.json:
##########
@@ -10,16 +10,17 @@
{"name": "string_col", "type": "STRING"},
{"name": "bool_col", "type": "BOOLEAN"},
{"name": "decimal_col", "type": "BIG_DECIMAL"},
- {"name": "timestamp_col", "type": "TIMESTAMP"}
+ {"name": "timestamp_col", "type": "TIMESTAMP"},
+ {"name": "bytes_col", "type": "BYTES"}
Review Comment:
The multi-stage runtime cases cover BYTES and BIG_DECIMAL end-to-end but not
UUID, which only gets exercised by the single-stage queries test and the
validation mapping. A uuid_col case here would close the gap for the inferred
UUID path.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]