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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to