2010YOUY01 opened a new issue, #12468:
URL: https://github.com/apache/datafusion/issues/12468

   ### Describe the bug
   
   See the reproducer in datafusion-cli (compiled from the latest main, commit 
468a5a805)
   
   `table1` and `table1_stringview` are two tables with logically equivalent 
data, but with different physical in-memory representations for string column, 
so given a random query, if we swap tables (`table1` <-> `table1_stringview`), 
the mutated query should generate the same query result, but the inconsistency 
has been found:
   ```
   ataFusion CLI v42.0.0
   > create table table1(v1 string);
   insert into table1 values('foo'), (NULL);
   create table table1_stringview as select arrow_cast(v1, 'Utf8View') as v1 
from table1;
   0 row(s) fetched.
   Elapsed 0.068 seconds.
   
   +-------+
   | count |
   +-------+
   | 2     |
   +-------+
   1 row(s) fetched.
   Elapsed 0.044 seconds.
   
   0 row(s) fetched.
   Elapsed 0.014 seconds.
   
   > select * from table1 as t1 natural join table1 as t2;
   +-----+
   | v1  |
   +-----+
   | foo |
   +-----+
   1 row(s) fetched.
   Elapsed 0.035 seconds.
   
   > select * from table1 as t1 natural join table1_stringview as t2;
   +-----+
   | v1  |
   +-----+
   | foo |
   |     |
   | foo |
   |     |
   +-----+
   4 row(s) fetched.
   Elapsed 0.006 seconds.
   ```
   
   ### To Reproduce
   
   _No response_
   
   ### Expected behavior
   
   _No response_
   
   ### Additional context
   
   Found by SQLancer https://github.com/apache/datafusion/issues/11030


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

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


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

Reply via email to