yashmayya commented on code in PR #16885:
URL: https://github.com/apache/pinot/pull/16885#discussion_r2380044611
##########
pinot-core/src/main/java/org/apache/pinot/core/operator/transform/function/CastTransformFunction.java:
##########
@@ -191,7 +194,19 @@ private long[] transformToTimestampValuesSV(ValueBlock
valueBlock) {
int length = valueBlock.getNumDocs();
initLongValuesSV(length);
String[] stringValues =
_transformFunction.transformToStringValuesSV(valueBlock);
- ArrayCopyUtils.copyToTimestamp(stringValues, _longValuesSV, length);
+ RoaringBitmap nullBitmap = _transformFunction.getNullBitmap(valueBlock);
+ if (nullBitmap != null) {
Review Comment:
Yeah, empty is returned as `null` -
https://github.com/apache/pinot/blob/0ea5bceafaada90598af85d6d8b71041cffea6d6/pinot-core/src/main/java/org/apache/pinot/core/operator/transform/function/BaseTransformFunction.java#L791-L793
https://github.com/apache/pinot/blob/0ea5bceafaada90598af85d6d8b71041cffea6d6/pinot-core/src/main/java/org/apache/pinot/core/operator/docvalsets/ProjectionBlockValSet.java#L67-L79
##########
pinot-core/src/main/java/org/apache/pinot/core/operator/transform/function/CastTransformFunction.java:
##########
@@ -191,7 +194,19 @@ private long[] transformToTimestampValuesSV(ValueBlock
valueBlock) {
int length = valueBlock.getNumDocs();
initLongValuesSV(length);
String[] stringValues =
_transformFunction.transformToStringValuesSV(valueBlock);
- ArrayCopyUtils.copyToTimestamp(stringValues, _longValuesSV, length);
+ RoaringBitmap nullBitmap = _transformFunction.getNullBitmap(valueBlock);
Review Comment:
Even if query time null handling is disabled, these default string null
values will cause the cast transform to fail. IMO it's the right behavior to
convert it to epoch value in that case too. We also do the same thing when null
handling is enabled, but there the null bitmap will actually end up being used
and the final query result for the `null` rows would be `null`.
Both these cases are illustrated in the new tests I added to
`NullQueriesFluentTest` btw.
--
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]