You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "imply-cheddar (via GitHub)" <gi...@apache.org> on 2023/02/08 06:56:12 UTC

[GitHub] [druid] imply-cheddar commented on pull request #13764: Fixing a data correctness issue in unnest when first row of an MVD is null

imply-cheddar commented on PR #13764:
URL: https://github.com/apache/druid/pull/13764#issuecomment-1422101133

   Did I understand you correctly that the previous (bad?) behavior was
   
   ```
   select * from mytest1, unnest(mv_to_array(c2)) as unnested(c3)
   
   __time c1 c2 c3
   2022-01-01T00:00:00.000Z 1 null null
   2022-01-01T00:00:00.000Z 2 ["A","B","C"] A
   2022-01-01T00:00:00.000Z 2 ["A","B","C"] B
   2022-01-01T00:00:00.000Z 2 ["A","B","C"] C
   ```
   
   I.e. when it gets to the second row that has an array of 3 values, it unnests it into 3 rows.
   
   And you changed the code to do
   
   ```
   select * from mytest1, unnest(mv_to_array(c2)) as unnested(c3)
   
   __time c1 c2 c3
   2022-01-01T00:00:00.000Z 1 null null
   2022-01-01T00:00:00.000Z 2 ["A","B","C"] null
   ```
   
   I.e. if it sees a null, it will use the null going forward an not unnest anything?
   
   If that understanding is correct, can you explain why the previous behavior is not the correct behavior?  It is what I had expected at least...


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org