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

[GitHub] [arrow-datafusion] alamb opened a new issue, #5617: Support parameter (`$1`) type inference for `LIKE` predicates

alamb opened a new issue, #5617:
URL: https://github.com/apache/arrow-datafusion/issues/5617

   **Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
   
   We are trying to run a query like this:
   
   ```sql
   SELECT ... WHERE col LIKE $1
   ```
   
   However the type inference logic in https://github.com/apache/arrow-datafusion/blob/0f6931caa6f8b48e116a8e77e989c404f31f3f8d/datafusion/sql/src/expr/mod.rs#L503
   
   only handles `=` predicates
   
   cc  @avantgardnerio 
   
   
   **Describe the solution you'd like**
   I would like the type inference logic to handle `LIKE`, `NOT LIKE`, `ILIKE` and `NOT ILIKE`
   
   **Describe alternatives you've considered**
   <!--
   A clear and concise description of any alternative solutions or features you've considered.
   -->
   
   **Additional context**
   Found while implementing FlightSQL (via parameterized queries) in IOx: https://github.com/influxdata/influxdb_iox/pull/7213
   


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

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


[GitHub] [arrow-datafusion] Weijun-H commented on issue #5617: Support parameter (`$1`) type inference for `LIKE` predicates

Posted by "Weijun-H (via GitHub)" <gi...@apache.org>.
Weijun-H commented on issue #5617:
URL: https://github.com/apache/arrow-datafusion/issues/5617#issuecomment-1472860276

   What is the outcome of the SQL query` SELECT ... WHERE col LIKE $1`? 🤔
   
   
   
   


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


[GitHub] [arrow-datafusion] alamb commented on issue #5617: Support parameter (`$1`) type inference for `LIKE` predicates

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #5617:
URL: https://github.com/apache/arrow-datafusion/issues/5617#issuecomment-1473616145

   > What is the outcome of the SQL query SELECT ... WHERE col LIKE $1? 🤔
   
   It is a `LogicalPlan` with `Expr::Placeholder` entries. It will error during physical planning if the parameters are not supplied with https://docs.rs/datafusion/20.0.0/datafusion/dataframe/struct.DataFrame.html#method.with_param_values
   
   However, today DataFusion will not create the LogicalPlan at all (it will error because it cant infer the type of `$1` and that type is needed for the rest of the analysis)


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


[GitHub] [arrow-datafusion] alamb commented on issue #5617: Support parameter (`$1`) type inference for `LIKE` predicates

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #5617:
URL: https://github.com/apache/arrow-datafusion/issues/5617#issuecomment-1470856804

   I found a workaround that works for https://github.com/influxdata/influxdb_iox/pull/7213


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