vbarua opened a new pull request, #13963:
URL: https://github.com/apache/datafusion/pull/13963

   ## Which issue does this PR close?
   Additional work for https://github.com/apache/datafusion/issues/13318
   
   ## Rationale for this change
   Improve the ergonomics of the consumer and fixed a gap in null literal 
handling.
   
   ## What changes are included in this PR?
   
   ### Consumer Improvements
   Adds two handlers to the SubstraitConsumer
   * `consume_rel`
   * `consume_expression`
   
   and routes all calls to `from_substrait_rel` and `from_substrait_rex` 
through them to allow users to customize behaviour at the Rel and Expression 
level.
   
   ### Null Literal Improvements
   The existing code in `from_substrait_null` would fail to handle nulls of 
user-defined types. The null handling code has been simplified to first convert 
the type of the null into a DataFusion DataType, which already allows for 
conversion of user-defined Substrait types using `consume_user_defined_type` 
and then converting that DataType into a ScalarValue.
   
   As an added benefit, this also allows us to remove a big-match block in 
`from_substrait_null`.
   
   ## Are these changes tested?
   Covered by existing conversion tests.
   
   ## Are there any user-facing changes?
   There are user-facing changes that require not work from uses. There are now 
additional methods on the SubstraitConsumer trait, but they have default 
implementations.


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