ankit0811 commented on code in PR #15607:
URL: https://github.com/apache/druid/pull/15607#discussion_r1446691178
##########
sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/EarliestLatestAnySqlAggregator.java:
##########
@@ -316,6 +344,16 @@ public EarliestLatestReturnTypeInference(int ordinal)
public RelDataType inferReturnType(SqlOperatorBinding sqlOperatorBinding)
{
RelDataType type = sqlOperatorBinding.getOperandType(this.ordinal);
+
+ // If complex and of type SerializablePairLong*, return type
+ if (type instanceof RowSignatures.ComplexSqlType) {
+ ColumnType complexColumnType = ((RowSignatures.ComplexSqlType)
type).getColumnType();
+ String complexTypeName = complexColumnType.getComplexTypeName();
+ if (complexTypeName != null &&
(complexTypeName.equals(SerializablePairLongLongComplexMetricSerde.TYPE_NAME)
||
complexTypeName.equals(SerializablePairLongFloatComplexMetricSerde.TYPE_NAME)
||
complexTypeName.equals(SerializablePairLongDoubleComplexMetricSerde.TYPE_NAME)))
{
Review Comment:
Thanks for catching this @LakshSingla
updated the PR
--
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]