You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "neilconway (via GitHub)" <gi...@apache.org> on 2026/02/07 16:11:59 UTC

[PR] fix: Handle NULL inputs correctly in find_in_set() [datafusion]

neilconway opened a new pull request, #20209:
URL: https://github.com/apache/datafusion/pull/20209

   The previous coding returned an array of the wrong type, leading to an assertion failure.
   
   ## Rationale for this change
   
   ```
   create table tt (x string);
   insert into tt values ('a'), ('b,a'), ('c'), (null);
   select find_in_set(tt.x, null) from tt;
   select find_in_set(null, tt.x) from tt;
   ```
   
   Yields:
   
   ```
   Internal error: Assertion failed: result_data_type == *expected_type: Function 'find_in_set' returned value of type 'Utf8View' while the following type was promised at planning time and expected: 'Int32'.
   This issue was likely caused by a bug in DataFusion's code. Please help us to resolve this by filing a bug report in our issue tracker: https://github.com/apache/datafusion/issues
   Internal error: Assertion failed: result_data_type == *expected_type: Function 'find_in_set' returned value of type 'Utf8View' while the following type was promised at planning time and expected: 'Int32'.
   This issue was likely caused by a bug in DataFusion's code. Please help us to resolve this by filing a bug report in our issue tracker: https://github.com/apache/datafusion/issues
   ```
   
   ## Are these changes tested?
   
   Yes, added an SLT test.
   


-- 
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-unsubscribe@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] fix: Handle NULL inputs correctly in find_in_set() [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #20209:
URL: https://github.com/apache/datafusion/pull/20209#issuecomment-3867074555

   Thanks @neilconway and @Jefffrey  👌 


-- 
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-unsubscribe@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] fix: Handle NULL inputs correctly in find_in_set() [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb merged PR #20209:
URL: https://github.com/apache/datafusion/pull/20209


-- 
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-unsubscribe@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org