GitHub user bertvermeiren edited a discussion: enum Expr extension on logical 
level

Hi,

In order to write some additional logical and physical plan implementations, we 
do have to create some kind of "composite" logical expression. 

Nowadays in the code base you have already existing expression implementations 
with such composite behaviour like the `ScalarFunction` expression containing 
other expressions (the arguments) ; the `AggregateFunction` containing 
_filtering_ and _order by_ expressions, etc.

Lot's of interfaces/API/traits are working on the `enum Expr` directly :

`UserLogicalNode::with_exprs_and_inputs` and related 
`UserLogicalNode::expressions`
Applying optimisation rules on those logical plans by analysing and potentially 
rewriting expressions.

By not having some customisation, we loose the internal semantics  of 
“composite” logical expressions if those have to be “decomposed” again into 
existing expression implementations to be used throughout the codebase.

Would it be opportune the have an extension point on logical expression as 
well, like it has been introduced on the `LogicalPlan::Extension(Extension)`?

What are the opinions on this ? Are there other alternatives ? How would such 
an extension look like ? 

Regards, Bert.


GitHub link: https://github.com/apache/datafusion/discussions/15297

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to