clintropolis opened a new pull request, #16690:
URL: https://github.com/apache/druid/pull/16690

   This PR fixes a regression caused by #16551 which modified the 
`UnnestStorageAdapter` to return the _output_ capabilities of the unnest column 
instead of the capabilities pre-unnest, which was totally cool and correct but 
was leaving out setting `setDictionaryValuesUnique` which is also used by 
unnest to check if it can use a dimension cursor.
   
   Though admittedly totally contrived, if used again in an UNNEST operator 
this would result in different behavior than prior to this change because the 
loss of `areDictionaryValuesUnique` would result in using the column value 
selector cursor instead of dimension selector based cursor which have different 
handling of null values due to the dimension cursors attempts to be compatible 
with the implicit unnest used by group-by and topN queries on mvds.
   
   While writing tests for this, I found another bug that could happen for any 
mvd rows with 0 size against any segment where the null value was not 
dictionary id 0 (such as realtime segments or segments without null values in 
the column). I fixed this by reporting 0 as the size of the unnested row if the 
underlying row is 0, which aligns behavior with the implicit unnest done by 
group-by and topN queries (even though they are not consistent with each other, 
see #5897).


-- 
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]

Reply via email to