Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-03-05 Thread via GitHub
jayzhan211 commented on PR #14737: URL: https://github.com/apache/datafusion/pull/14737#issuecomment-2702360741 Thanks @alan910127 -- 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 co

Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-03-05 Thread via GitHub
jayzhan211 merged PR #14737: URL: https://github.com/apache/datafusion/pull/14737 -- 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: github-unsubscr...@dat

Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-03-05 Thread via GitHub
alan910127 commented on PR #14737: URL: https://github.com/apache/datafusion/pull/14737#issuecomment-2701404840 @jayzhan211 Thank you so much for all the help and guidance! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and u

Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-03-05 Thread via GitHub
alan910127 commented on code in PR #14737: URL: https://github.com/apache/datafusion/pull/14737#discussion_r1981330059 ## datafusion/functions-nested/src/sort.rs: ## @@ -175,6 +204,7 @@ pub fn array_sort_inner(args: &[ArrayRef]) -> Result { for i in 0..row_count {

Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-03-05 Thread via GitHub
jayzhan211 commented on code in PR #14737: URL: https://github.com/apache/datafusion/pull/14737#discussion_r1981277730 ## datafusion/functions-nested/src/sort.rs: ## @@ -175,6 +204,7 @@ pub fn array_sort_inner(args: &[ArrayRef]) -> Result { for i in 0..row_count {

Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-03-05 Thread via GitHub
jayzhan211 commented on code in PR #14737: URL: https://github.com/apache/datafusion/pull/14737#discussion_r1981271099 ## datafusion/sqllogictest/test_files/array.slt: ## @@ -2243,9 +2245,9 @@ select array_sort(column1, 'DESC', 'NULLS LAST') from arrays_values; [30, 29, 28, 27

Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-03-05 Thread via GitHub
alan910127 commented on code in PR #14737: URL: https://github.com/apache/datafusion/pull/14737#discussion_r1980886467 ## datafusion/expr/src/type_coercion/functions.rs: ## @@ -435,6 +436,10 @@ fn get_valid_types( match array_type { DataType::List(_) | Data

Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-03-05 Thread via GitHub
alan910127 commented on code in PR #14737: URL: https://github.com/apache/datafusion/pull/14737#discussion_r1980886102 ## datafusion/functions-nested/src/resize.rs: ## @@ -106,6 +127,7 @@ impl ScalarUDFImpl for ArrayResize { match &arg_types[0] { List(field

Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-03-03 Thread via GitHub
alamb commented on PR #14737: URL: https://github.com/apache/datafusion/pull/14737#issuecomment-2695621372 Marking as draft as I think this PR is no longer waiting on feedback. Please mark it as ready for review when it is ready for another look -- This is an automated message from the A

Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-02-25 Thread via GitHub
alan910127 commented on code in PR #14737: URL: https://github.com/apache/datafusion/pull/14737#discussion_r1969777660 ## datafusion/expr/src/type_coercion/functions.rs: ## @@ -435,6 +436,10 @@ fn get_valid_types( match array_type { DataType::List(_) | Data

Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-02-25 Thread via GitHub
alan910127 commented on code in PR #14737: URL: https://github.com/apache/datafusion/pull/14737#discussion_r1969777660 ## datafusion/expr/src/type_coercion/functions.rs: ## @@ -435,6 +436,10 @@ fn get_valid_types( match array_type { DataType::List(_) | Data

Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-02-25 Thread via GitHub
alan910127 commented on code in PR #14737: URL: https://github.com/apache/datafusion/pull/14737#discussion_r1969771105 ## datafusion/functions-nested/src/resize.rs: ## @@ -106,6 +127,7 @@ impl ScalarUDFImpl for ArrayResize { match &arg_types[0] { List(field

Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-02-25 Thread via GitHub
jayzhan211 commented on code in PR #14737: URL: https://github.com/apache/datafusion/pull/14737#discussion_r1969513878 ## datafusion/sqllogictest/test_files/array.slt: ## @@ -2546,8 +2568,10 @@ select array_append(column1, arrow_cast(make_array(1, 11, 111), 'FixedSizeList(3 #

Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-02-25 Thread via GitHub
jayzhan211 commented on code in PR #14737: URL: https://github.com/apache/datafusion/pull/14737#discussion_r1969525703 ## datafusion/functions-nested/src/resize.rs: ## @@ -106,6 +127,7 @@ impl ScalarUDFImpl for ArrayResize { match &arg_types[0] { List(field

Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-02-25 Thread via GitHub
jayzhan211 commented on code in PR #14737: URL: https://github.com/apache/datafusion/pull/14737#discussion_r1969521946 ## datafusion/expr/src/type_coercion/functions.rs: ## @@ -435,6 +436,10 @@ fn get_valid_types( match array_type { DataType::List(_) | Data

Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-02-25 Thread via GitHub
alan910127 commented on code in PR #14737: URL: https://github.com/apache/datafusion/pull/14737#discussion_r1969235204 ## datafusion/sqllogictest/test_files/array.slt: ## @@ -2546,8 +2568,10 @@ select array_append(column1, arrow_cast(make_array(1, 11, 111), 'FixedSizeList(3 #

Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-02-25 Thread via GitHub
alan910127 commented on code in PR #14737: URL: https://github.com/apache/datafusion/pull/14737#discussion_r1969203040 ## datafusion/functions-nested/src/sort.rs: ## @@ -143,6 +168,10 @@ pub fn array_sort_inner(args: &[ArrayRef]) -> Result { return exec_err!("array_sor

Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-02-25 Thread via GitHub
alan910127 commented on code in PR #14737: URL: https://github.com/apache/datafusion/pull/14737#discussion_r1969203040 ## datafusion/functions-nested/src/sort.rs: ## @@ -143,6 +168,10 @@ pub fn array_sort_inner(args: &[ArrayRef]) -> Result { return exec_err!("array_sor

Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-02-24 Thread via GitHub
jayzhan211 commented on code in PR #14737: URL: https://github.com/apache/datafusion/pull/14737#discussion_r1969168798 ## datafusion/functions-nested/src/sort.rs: ## @@ -143,6 +168,10 @@ pub fn array_sort_inner(args: &[ArrayRef]) -> Result { return exec_err!("array_sor

Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-02-24 Thread via GitHub
alan910127 commented on code in PR #14737: URL: https://github.com/apache/datafusion/pull/14737#discussion_r1969021807 ## datafusion/functions-nested/src/sort.rs: ## @@ -143,6 +168,10 @@ pub fn array_sort_inner(args: &[ArrayRef]) -> Result { return exec_err!("array_sor

Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-02-24 Thread via GitHub
jayzhan211 commented on code in PR #14737: URL: https://github.com/apache/datafusion/pull/14737#discussion_r1967573526 ## datafusion/functions-nested/src/sort.rs: ## @@ -143,6 +168,10 @@ pub fn array_sort_inner(args: &[ArrayRef]) -> Result { return exec_err!("array_sor

Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-02-24 Thread via GitHub
jayzhan211 commented on code in PR #14737: URL: https://github.com/apache/datafusion/pull/14737#discussion_r1967573526 ## datafusion/functions-nested/src/sort.rs: ## @@ -143,6 +168,10 @@ pub fn array_sort_inner(args: &[ArrayRef]) -> Result { return exec_err!("array_sor

Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-02-24 Thread via GitHub
jayzhan211 commented on code in PR #14737: URL: https://github.com/apache/datafusion/pull/14737#discussion_r1967573526 ## datafusion/functions-nested/src/sort.rs: ## @@ -143,6 +168,10 @@ pub fn array_sort_inner(args: &[ArrayRef]) -> Result { return exec_err!("array_sor

Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-02-24 Thread via GitHub
jayzhan211 commented on code in PR #14737: URL: https://github.com/apache/datafusion/pull/14737#discussion_r1967507986 ## datafusion/sqllogictest/test_files/array.slt: ## @@ -2235,36 +2235,43 @@ select array_sort(make_array(1, 3, null, 5, NULL, -5)), array_sort(make_array(1, -

Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-02-24 Thread via GitHub
jayzhan211 commented on code in PR #14737: URL: https://github.com/apache/datafusion/pull/14737#discussion_r1967486248 ## datafusion/sqllogictest/test_files/array.slt: ## @@ -2235,36 +2235,43 @@ select array_sort(make_array(1, 3, null, 5, NULL, -5)), array_sort(make_array(1, -

Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-02-24 Thread via GitHub
alan910127 commented on PR #14737: URL: https://github.com/apache/datafusion/pull/14737#issuecomment-2677923881 the tests failed because the error message didn’t match. It looks like the pipeline outputs more than we expected. I temporarily removed the error message check in `array.slt` to

Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-02-23 Thread via GitHub
jayzhan211 commented on code in PR #14737: URL: https://github.com/apache/datafusion/pull/14737#discussion_r1966955590 ## datafusion/sqllogictest/test_files/array.slt: ## @@ -2265,6 +2265,35 @@ select array_sort([]); [] +# test with null arguments +# expected error: +#

Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-02-23 Thread via GitHub
alan910127 commented on code in PR #14737: URL: https://github.com/apache/datafusion/pull/14737#discussion_r1966815085 ## datafusion/sqllogictest/test_files/array.slt: ## @@ -2265,6 +2265,35 @@ select array_sort([]); [] +# test with null arguments +# expected error: +#

Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-02-22 Thread via GitHub
alan910127 commented on code in PR #14737: URL: https://github.com/apache/datafusion/pull/14737#discussion_r1966587874 ## datafusion/sqllogictest/test_files/array.slt: ## @@ -2265,6 +2265,35 @@ select array_sort([]); [] +# test with null arguments +# expected error: +#

Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-02-21 Thread via GitHub
jayzhan211 commented on code in PR #14737: URL: https://github.com/apache/datafusion/pull/14737#discussion_r1966326123 ## datafusion/sqllogictest/test_files/array.slt: ## @@ -2265,6 +2265,35 @@ select array_sort([]); [] +# test with null arguments +# expected error: +#

Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-02-21 Thread via GitHub
jayzhan211 commented on code in PR #14737: URL: https://github.com/apache/datafusion/pull/14737#discussion_r1966326123 ## datafusion/sqllogictest/test_files/array.slt: ## @@ -2265,6 +2265,35 @@ select array_sort([]); [] +# test with null arguments +# expected error: +#

Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-02-21 Thread via GitHub
alan910127 commented on code in PR #14737: URL: https://github.com/apache/datafusion/pull/14737#discussion_r1965962598 ## datafusion/functions-nested/src/sort.rs: ## @@ -143,6 +169,13 @@ pub fn array_sort_inner(args: &[ArrayRef]) -> Result { return exec_err!("array_sor

Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-02-21 Thread via GitHub
alan910127 commented on code in PR #14737: URL: https://github.com/apache/datafusion/pull/14737#discussion_r1966030422 ## datafusion/sqllogictest/test_files/array.slt: ## @@ -2265,6 +2265,35 @@ select array_sort([]); [] +# test with null arguments +# expected error: +#

Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-02-21 Thread via GitHub
alan910127 commented on code in PR #14737: URL: https://github.com/apache/datafusion/pull/14737#discussion_r1965956601 ## datafusion/sqllogictest/test_files/array.slt: ## @@ -2265,6 +2265,35 @@ select array_sort([]); [] +# test with null arguments +# expected error: +#

Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-02-20 Thread via GitHub
jayzhan211 commented on code in PR #14737: URL: https://github.com/apache/datafusion/pull/14737#discussion_r1964585028 ## datafusion/sqllogictest/test_files/array.slt: ## @@ -2265,6 +2265,35 @@ select array_sort([]); [] +# test with null arguments +# expected error: +#

Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-02-20 Thread via GitHub
jayzhan211 commented on code in PR #14737: URL: https://github.com/apache/datafusion/pull/14737#discussion_r1964584626 ## datafusion/sqllogictest/test_files/array.slt: ## @@ -2265,6 +2265,35 @@ select array_sort([]); [] +# test with null arguments +# expected error: +#

Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-02-20 Thread via GitHub
jayzhan211 commented on code in PR #14737: URL: https://github.com/apache/datafusion/pull/14737#discussion_r1964563153 ## datafusion/functions-nested/src/sort.rs: ## @@ -143,6 +169,13 @@ pub fn array_sort_inner(args: &[ArrayRef]) -> Result { return exec_err!("array_sor

Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-02-19 Thread via GitHub
alan910127 commented on code in PR #14737: URL: https://github.com/apache/datafusion/pull/14737#discussion_r1962752150 ## datafusion/expr-common/src/signature.rs: ## @@ -358,6 +358,8 @@ pub enum ArrayFunctionArgument { /// An argument of type List/LargeList/FixedSizeList. A

Re: [PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-02-19 Thread via GitHub
jayzhan211 commented on code in PR #14737: URL: https://github.com/apache/datafusion/pull/14737#discussion_r1962608614 ## datafusion/expr-common/src/signature.rs: ## @@ -358,6 +358,8 @@ pub enum ArrayFunctionArgument { /// An argument of type List/LargeList/FixedSizeList. A

[PR] fix: graceful NULL and type error handling in array functions [datafusion]

2025-02-17 Thread via GitHub
alan910127 opened a new pull request, #14737: URL: https://github.com/apache/datafusion/pull/14737 ## Which issue does this PR close? - Closes #14451. ## Rationale for this change This change ensures that array functions handle `NULL` and incorrect argument t