juju4 commented on issue #15872:
URL: https://github.com/apache/datafusion/issues/15872#issuecomment-2870214294

   it does or need subquery to evaluate
   ```
   > select * from 'test-datafusion.csv' where regexp_match(b, '-O') is not 
null;
   +---+--------------+
   | a | b            |
   +---+--------------+
   | 3 | four -O test |
   +---+--------------+
   1 row(s) fetched.
   Elapsed 0.071 seconds.
   > select regexp_match(b, '(.){4,}') as res from 'test-datafusion.csv' WHERE 
res IS NOT NULL;
   Schema error: No field named res. Valid fields are "test-datafusion.csv".a, 
"test-datafusion.csv".b.
   > select regexp_match(b, '\s-O\s') from 'test-datafusion.csv';
   +----------------------------------------------------+
   | regexp_match(test-datafusion.csv.b,Utf8("\s-O\s")) |
   +----------------------------------------------------+
   | NULL                                               |
   | NULL                                               |
   | NULL                                               |
   | [ -O ]                                             |
   +----------------------------------------------------+
   4 row(s) fetched.
   Elapsed 0.010 seconds.
   > select b from (select b,regexp_match(b, '\s-O\s') as r from 
'test-datafusion.csv') where r IS NOT NULL;
   +--------------+
   | b            |
   +--------------+
   | four -O test |
   +--------------+
   1 row(s) fetched.
   Elapsed 0.013 seconds.
   
   ```
   


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