Re: [PR] Fix: Map functions crash on out of bounds cases [datafusion]

2025-06-17 Thread via GitHub
comphead commented on PR #16203: URL: https://github.com/apache/datafusion/pull/16203#issuecomment-2981716899 > @comphead, can you please tell if there is something I can do to move this forward? Are there any relevant benches I could either run or adapt for this case? Sorry I didn't

Re: [PR] Fix: Map functions crash on out of bounds cases [datafusion]

2025-06-11 Thread via GitHub
krishvishal commented on PR #16203: URL: https://github.com/apache/datafusion/pull/16203#issuecomment-2963817531 @comphead, can you please tell if there is something I can do to move this forward? Are there any relevant benches I could either run or adapt for this case? -- This is an aut

Re: [PR] Fix: Map functions crash on out of bounds cases [datafusion]

2025-06-04 Thread via GitHub
comphead commented on PR #16203: URL: https://github.com/apache/datafusion/pull/16203#issuecomment-2940556210 Thanks @krishvishal let me quickly double check if we can do it with less data massaging. Since this will happen on execution layer it would be called for every batch of data possib

Re: [PR] Fix: Map functions crash on out of bounds cases [datafusion]

2025-06-04 Thread via GitHub
krishvishal commented on PR #16203: URL: https://github.com/apache/datafusion/pull/16203#issuecomment-2939080331 @comphead I've pushed additional fixes you've asked. I think the PR is ready. Let me know if it is okay. -- This is an automated message from the Apache Git Service. To respond

Re: [PR] Fix: Map functions crash on out of bounds cases [datafusion]

2025-06-03 Thread via GitHub
krishvishal commented on code in PR #16203: URL: https://github.com/apache/datafusion/pull/16203#discussion_r2124983624 ## datafusion/functions-nested/src/extract.rs: ## @@ -225,44 +252,37 @@ where return Ok(Arc::new(NullArray::new(array.len(; } +// Check

Re: [PR] Fix: Map functions crash on out of bounds cases [datafusion]

2025-06-03 Thread via GitHub
krishvishal commented on code in PR #16203: URL: https://github.com/apache/datafusion/pull/16203#discussion_r2124983434 ## datafusion/functions-nested/src/extract.rs: ## @@ -213,6 +213,33 @@ fn array_element_inner(args: &[ArrayRef]) -> Result { } } +/// Adjusts a 1-base

Re: [PR] Fix: Map functions crash on out of bounds cases [datafusion]

2025-06-03 Thread via GitHub
krishvishal commented on code in PR #16203: URL: https://github.com/apache/datafusion/pull/16203#discussion_r2124973342 ## datafusion/functions-nested/src/extract.rs: ## @@ -225,44 +252,37 @@ where return Ok(Arc::new(NullArray::new(array.len(; } +// Check

Re: [PR] Fix: Map functions crash on out of bounds cases [datafusion]

2025-06-03 Thread via GitHub
krishvishal commented on code in PR #16203: URL: https://github.com/apache/datafusion/pull/16203#discussion_r2124973342 ## datafusion/functions-nested/src/extract.rs: ## @@ -225,44 +252,37 @@ where return Ok(Arc::new(NullArray::new(array.len(; } +// Check

Re: [PR] Fix: Map functions crash on out of bounds cases [datafusion]

2025-06-03 Thread via GitHub
comphead commented on code in PR #16203: URL: https://github.com/apache/datafusion/pull/16203#discussion_r2124970073 ## datafusion/functions-nested/src/extract.rs: ## @@ -225,44 +252,37 @@ where return Ok(Arc::new(NullArray::new(array.len(; } +// Check if

Re: [PR] Fix: Map functions crash on out of bounds cases [datafusion]

2025-06-03 Thread via GitHub
krishvishal commented on code in PR #16203: URL: https://github.com/apache/datafusion/pull/16203#discussion_r2124965299 ## datafusion/functions-nested/src/extract.rs: ## @@ -225,44 +252,37 @@ where return Ok(Arc::new(NullArray::new(array.len(; } +// Check

Re: [PR] Fix: Map functions crash on out of bounds cases [datafusion]

2025-06-03 Thread via GitHub
comphead commented on code in PR #16203: URL: https://github.com/apache/datafusion/pull/16203#discussion_r2124930746 ## datafusion/functions-nested/src/extract.rs: ## @@ -213,6 +213,33 @@ fn array_element_inner(args: &[ArrayRef]) -> Result { } } +/// Adjusts a 1-based a

Re: [PR] Fix: Map functions crash on out of bounds cases [datafusion]

2025-06-03 Thread via GitHub
comphead commented on code in PR #16203: URL: https://github.com/apache/datafusion/pull/16203#discussion_r212493 ## datafusion/functions-nested/src/extract.rs: ## @@ -225,44 +252,37 @@ where return Ok(Arc::new(NullArray::new(array.len(; } +// Check if

Re: [PR] Fix: Map functions crash on out of bounds cases [datafusion]

2025-06-03 Thread via GitHub
krishvishal commented on PR #16203: URL: https://github.com/apache/datafusion/pull/16203#issuecomment-2937158972 @comphead I've had to add the handler because the previous fix caused wrong behavior. For example the following query currently returns: ```sql > select [named_st

Re: [PR] Fix: Map functions crash on out of bounds cases [datafusion]

2025-06-03 Thread via GitHub
comphead commented on PR #16203: URL: https://github.com/apache/datafusion/pull/16203#issuecomment-2936960243 Thanks @krishvishal the latest version becomes much more complicated compared to prev one. This can be a subject to check the performance. What is the reason for adding the sp

Re: [PR] Fix: Map functions crash on out of bounds cases [datafusion]

2025-06-02 Thread via GitHub
krishvishal commented on PR #16203: URL: https://github.com/apache/datafusion/pull/16203#issuecomment-2933308216 @comphead I've changed the implementation a bit to handle nulls properly. Previous just outputs `NULL` for queries like `select [named_struct('a', 1, 'b', null)][1];` instead of

Re: [PR] Fix: Map functions crash on out of bounds cases [datafusion]

2025-06-02 Thread via GitHub
comphead commented on PR #16203: URL: https://github.com/apache/datafusion/pull/16203#issuecomment-2932086115 @krishvishal are you still planning to wrap this PR up? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use th

Re: [PR] Fix: Map functions crash on out of bounds cases [datafusion]

2025-05-28 Thread via GitHub
comphead commented on code in PR #16203: URL: https://github.com/apache/datafusion/pull/16203#discussion_r2112201561 ## datafusion/functions-nested/src/extract.rs: ## @@ -225,6 +225,23 @@ where return Ok(Arc::new(NullArray::new(array.len(; } +if let DataT

Re: [PR] Fix: Map functions crash on out of bounds cases [datafusion]

2025-05-28 Thread via GitHub
comphead commented on code in PR #16203: URL: https://github.com/apache/datafusion/pull/16203#discussion_r211218 ## datafusion/functions-nested/src/extract.rs: ## @@ -225,6 +225,23 @@ where return Ok(Arc::new(NullArray::new(array.len(; } +if let DataT

Re: [PR] Fix: Map functions crash on out of bounds cases [datafusion]

2025-05-28 Thread via GitHub
comphead commented on code in PR #16203: URL: https://github.com/apache/datafusion/pull/16203#discussion_r2112176250 ## datafusion/functions-nested/src/extract.rs: ## @@ -225,6 +225,23 @@ where return Ok(Arc::new(NullArray::new(array.len(; } +if let DataT

Re: [PR] Fix: Map functions crash on out of bounds cases [datafusion]

2025-05-28 Thread via GitHub
Copilot commented on code in PR #16203: URL: https://github.com/apache/datafusion/pull/16203#discussion_r2112167277 ## datafusion/functions-nested/src/extract.rs: ## @@ -225,6 +225,23 @@ where return Ok(Arc::new(NullArray::new(array.len(; } +if let DataTy