You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/11/23 11:43:40 UTC

[GitHub] [arrow-datafusion] alamb opened a new issue, #4337: Implement protobuf serialization for Expr::ScalarSubquery(_) | Expr::InSubquery { .. } | Expr::Exists { .. }

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

   **Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
   
   In IOx, when a user issued an unsupported subquery, they got a very confusing message about serialization
   
   ```
   ❯ select count(*) from foo where exists (select column1 from foo);
   Error during planning: Error encoding expr as protobuf: General error: Proto serialization error: Expr::ScalarSubquery(_) | Expr::InSubquery { .. } | Expr::Exists { .. }#6195
   ```
   
   This is because the EXISTS predicate could not be sent / serialized. If it could have been, the code in the physical plan would have said "does not support logical exists (SUBQUERY)"
   
   **Describe the solution you'd like**
   I would like to implement the protobuf serialization for such subqueries. This would allow the user to see the real error
   
   ```
   ❯ select count(*) from foo where exists (select column1 from foo);
   NotImplemented("Physical plan does not support logical expression EXISTS (<subquery>)")
   ```
   
   https://github.com/apache/arrow-datafusion/blob/d355f69aae2cc951cfd021e5c0b690861ba0c4ac/datafusion/proto/src/to_proto.rs#L850-L853
   
   However in order to do so we would likely have to serialize entire LogicalPlans (which I will file a ticket for)
   
   
   
   
   **Describe alternatives you've considered**
   We could put a specific error in IOx for this error but I would prefer to implement the protobuf serialization because it will stay in sync with DataFusions features (e.g. when datafusion does support this kind of query, we won't have to remember to remove the IOx specific check)
   
   **Additional context**
   Add any other context or screenshots about the feature request here.
   


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