KKcorps commented on code in PR #10386:
URL: https://github.com/apache/pinot/pull/10386#discussion_r1152835132
##########
pinot-core/src/main/java/org/apache/pinot/core/operator/transform/function/BaseTransformFunction.java:
##########
@@ -188,6 +259,57 @@ public long[] transformToLongValuesSV(ValueBlock
valueBlock) {
return _longValuesSV;
}
+ @Override
+ public Pair<long[], RoaringBitmap>
transformToLongValuesSVWithNull(ValueBlock valueBlock) {
+ int length = valueBlock.getNumDocs();
+ if (_longValuesSV == null) {
+ _longValuesSV = new long[length];
+ }
+ RoaringBitmap bitmap;
+ DataType resultDataType = getResultMetadata().getDataType();
+ switch (resultDataType.getStoredType()) {
+ case UNKNOWN:
+ bitmap = new RoaringBitmap();
+ bitmap.add(0L, length);
+ for (int i = 0; i < length; i++) {
+ _longValuesSV[i] = (long)
DataSchema.ColumnDataType.LONG.getNullPlaceholder();
Review Comment:
Cool. Just mention a TODO on top of this then 'it is being done to ensure
behaviour consistency with non null-handling. Can be removed in the future if
we make nullHandling as default` flow.
##########
pinot-core/src/main/java/org/apache/pinot/core/operator/transform/function/BaseTransformFunction.java:
##########
@@ -188,6 +259,57 @@ public long[] transformToLongValuesSV(ValueBlock
valueBlock) {
return _longValuesSV;
}
+ @Override
+ public Pair<long[], RoaringBitmap>
transformToLongValuesSVWithNull(ValueBlock valueBlock) {
+ int length = valueBlock.getNumDocs();
+ if (_longValuesSV == null) {
+ _longValuesSV = new long[length];
+ }
+ RoaringBitmap bitmap;
+ DataType resultDataType = getResultMetadata().getDataType();
+ switch (resultDataType.getStoredType()) {
+ case UNKNOWN:
+ bitmap = new RoaringBitmap();
+ bitmap.add(0L, length);
+ for (int i = 0; i < length; i++) {
+ _longValuesSV[i] = (long)
DataSchema.ColumnDataType.LONG.getNullPlaceholder();
Review Comment:
Cool. Just mention a TODO on top of this then 'it is being done to ensure
behaviour consistency with non null-handling. Can be removed in the future if
we make nullHandling as default flow`.
--
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]