vegarsti commented on PR #16985:
URL: https://github.com/apache/datafusion/pull/16985#issuecomment-3148121449

   I discovered  the `project` method on EquivalenceProperties, which does what 
we need: We can get the unnest plan's equivalence properties by doing 
`input_eq_properties.project(unnested_columns, schema)`.
   
   Equivalence properties are
   1. equivalence groups (expressions with the same value)
   2. ordering equivalence classes (expressions that define the same ordering)
   3. table constraints - these can be primary key or unique
   
   I am pretty sure that this takes care of 1 and 2, since we now have no 
equivalence properties about the columns. I am not yet sure about 3, though - 
if the original expression uses a column that is a primary key, after the 
unnest we will have multiple rows with the same column. Does that mean we need 
to remove that constraint from the eq properties, or is it unrelated?


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