davisp opened a new issue, #16309:
URL: https://github.com/apache/datafusion/issues/16309

   ### Is your feature request related to a problem or challenge?
   
   A lack documentation on table constraint enforcement makes it difficult for 
TableProvider authors to have a clear view on when or how TableConstraints 
might or might not be enforced.
   
   ### Describe the solution you'd like
   
   Currently there's no good documentation on how DataFusion handles (or 
rather, doesn't handle) table constraints like primary key, foreign key, or 
uniqueness. I think it'd be a good idea do have documentation on what 
DataFusion does or does not enforce (i.e., nullness is enforced, but not 
uniqueness) as well as hopefully adding common suggestions on how various 
storage engines have implemented constraints.
   
   I think it'd also likely be useful to have other background like [this 
comment](https://github.com/apache/datafusion/issues/6190#issuecomment-1532107309)
 that mention how constraints aren't considered in optimizations while 
something like distinct count is. The subtle point is that folks might assume 
that telling datafusion something is a primary key or unique doesn't 
necessarily mean the optimizer will trust that.
   
   ### Describe alternatives you've considered
   
   _No response_
   
   ### Additional context
   
   _No response_


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