findepi commented on PR #12864:
URL: https://github.com/apache/datafusion/pull/12864#issuecomment-2437123342

   > I think as long as there is no regression we should move on and file the 
ticket for the remaining issue.
   
   Sorry for not following earlier, was on a full-day event yesterday.
   
   There are regressions.
   I kind of felt it's obvious from the way it works, sorry for not providing 
good examples earlier.
   
   ### Before the change
   
   ```
   > CREATE OR REPLACE TABLE t(a int) AS SELECT length(a) FROM (VALUES 
('+123')) t(a); SELECT * FROM t;
   0 row(s) fetched.
   Elapsed 0.005 seconds.
   
   +---+
   | a |
   +---+
   | 4 |
   +---+
   ```
   
   ```
   > CREATE OR REPLACE TABLE t(a int) AS SELECT length(a) FROM (VALUES 
('abcd')) t(a); SELECT * FROM t;
   0 row(s) fetched.
   Elapsed 0.078 seconds.
   
   +---+
   | a |
   +---+
   | 4 |
   +---+
   ```
   
   ### on current `main`
   
   Wrong result:
   
   ```
   > CREATE OR REPLACE TABLE t(a int) AS SELECT length(a) FROM (VALUES 
('+123')) t(a); SELECT * FROM t;
   0 row(s) fetched.
   Elapsed 0.071 seconds.
   
   +---+
   | a |
   +---+
   | 3 |
   ```
   
   failure
   ```
   > CREATE OR REPLACE TABLE t(a int) AS SELECT length(a) FROM (VALUES 
('abcd')) t(a); SELECT * FROM t;
   Arrow error: Cast error: Cannot cast string 'abcd' to value of Int32 type
   ```
   


-- 
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

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