LakshSingla commented on code in PR #16800:
URL: https://github.com/apache/druid/pull/16800#discussion_r1692447564
##########
processing/src/main/java/org/apache/druid/query/operator/WindowOperatorQueryQueryToolChest.java:
##########
@@ -116,6 +128,36 @@ public Sequence<Object[]> resultsAsArrays(
return (Sequence) resultSequence;
}
+ @Override
+ public Optional<Sequence<FrameSignaturePair>> resultsAsFrames(
+ WindowOperatorQuery query,
+ Sequence<RowsAndColumns> resultSequence,
+ MemoryAllocatorFactory memoryAllocatorFactory,
+ boolean useNestedForUnknownTypes
+ )
+ {
+ RowSignature rowSignature = resultArraySignature(query);
+ RowSignature modifiedRowSignature = useNestedForUnknownTypes
+ ?
FrameWriterUtils.replaceUnknownTypesWithNestedColumns(rowSignature)
+ : rowSignature;
Review Comment:
We had a problem of unknown types in the subqueries which is largely
resolved now. Theoretically, each primitive/array type can be serialized as
JSON type. Therefore if somebody sets `useNestedForUnknownColumnTypes`, we
replace columns without a signature with JSON type, so that they can be
serialized as frames.
It is an undocumented parameter, and is only applicable for
`resultsAsFrames` since that relies on types being present.
--
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]