You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "jayzhan211 (via GitHub)" <gi...@apache.org> on 2023/05/30 05:09:15 UTC

[GitHub] [arrow-datafusion] jayzhan211 commented on issue #6410: Substrait: InList support for strings

jayzhan211 commented on issue #6410:
URL: https://github.com/apache/arrow-datafusion/issues/6410#issuecomment-1567762086

   I fail to reproduce the error.
   I add this test in `intersection.slt` and run `cargo test --test sqllogictests` and there is no error.
   ```
   query I
   select int_col from alltypes_plain where CAST(date_string_col as VARCHAR) in ('a', 'b', 'c')
   ----
   ```
   Also, adding the test to the roundtrip logical plan with DataType::UTF8 is also fine. Only failed on the test when len of the list is over THRESHOLD_INLINE_INLIST (3).
   ```rs
   // PASS
   #[tokio::test]
       async fn roundtrip_inlist_1() -> Result<()> {
           roundtrip("SELECT * FROM data WHERE f IN ('a', 'b', 'c')").await
       }
   // FAIL
   #[tokio::test]
       async fn roundtrip_inlist_2() -> Result<()> {
           roundtrip("SELECT * FROM data WHERE f IN ('a', 'b', 'c', 'd')").await
       }
   //ERROR LOG
   //Error: NotImplemented("Unsupported expression: data.f IN ([Utf8(\"a\"), Utf8(\"b\"), Utf8(\"c\"), Utf8(\"d\")])")
   ```
   
   Therefore I have two questions, 
   1. How to reproduce the error you mention, if it is not the way I add the test to`sqllogictests`, it would be nice if the command and the path to add the test case are provided.
   2. We should support the Expr:InList to Substrait when the length of the list in InList is over THRESHOLD_INLINE_INLIST, in other words, pass roundtrip_inlist_2(), right?


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

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