Rachelint commented on issue #7194: URL: https://github.com/apache/arrow-datafusion/issues/7194#issuecomment-1708682082
> Hello, @Rachelint! As I understand, you worry about two questions: "Can `NULL` be an element in array?" and "May I implement DuckDB implementations rather ClickHouse?". I can not give you guarantees about null handling, because that problem has long history and lots of contradictions. If you interest about it, you can read the discussion in [#7142 (comment)](https://github.com/apache/arrow-datafusion/issues/7142#issuecomment-1693517988). Also, I would like to notice @jayzhan211 and his PR: #7338. The answer of the second question is predictably simple: you can use any methods if they have pragmatic value. > > I think I can answer all your questions. If you don't comprehend some situations, then you can ask me again :) Thanks for the reply, it's very helpful to me!I am reading #7142 and #7338 , and I feel it can solve my confusion. I'm really confused about how datafusion intends to handle `NULL`, and thing got worse after I see the different behaviors in `duckdb` and `clickhouse`... I think above discussion can help me a lot ! About `May I implement DuckDB implementations rather ClickHouse`, it is due some behaviors in `clickhouse` confused me actually... And behaviors in `duckdb` seem more understandable. For example, this query is no problem in `clickhouse`: ``` SELECT arrayResize([1, 2, 3], 4, NULL) [1,2,3,NULL] ``` But this query may occur error: ``` SELECT arrayResize([[1], [2], [3]], 4, NULL) Code: 386. DB::Exception: There is no supertype for types Array(UInt8), Nullable(Nothing) because some of them are Array and some of them are not: While processing arrayResize([[1], [2], [3]], 4, NULL). (NO_COMMON_TYPE) (version 23.8.1.2891 (official build)) ``` But it may be not so important now, because my main purpose is to know how datafusion plans to handle this, and the discussion may help. -- 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]
