panbingkun commented on PR #48261: URL: https://github.com/apache/spark/pull/48261#issuecomment-2378283406
- Let me give an example of a real production environment: ```sql CREATE TABLE t(a string, b long, data array<int>, value int) USING PARQUET; INSERT INTO TABLE t VALUES ('a', 1, array(1, 2, 3, null), null); INSERT INTO TABLE t VALUES ('b', 2, array(1, 2, 3, 4), 4); INSERT INTO TABLE t VALUES ('c', 3, array(1, 2, 3, 5), 4); INSERT INTO TABLE t VALUES ('c', 3, array(1, 2, 3, 4), null); SELECT * FROM t; ``` - A data processor that writes the following SQL statement: ```sql SELECT * FROM t WHERE array_contains(data, value) ``` - It is expected to obtain the following data: ``` +---+---+------------------+-----+ |a |b |data |value| +---+---+------------------+-----+ |a |1 |[1, 2, 3, null] |null | |b |2 |[1, 2, 3, 4] |4 | +---+---+------------------+-----+ ``` - But ``` +---+---+------------+-----+ |a |b |data |value| +---+---+------------+-----+ |b |2 |[1, 2, 3, 4]|4 | +---+---+------------+-----+ ``` -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org