alamb commented on issue #23236:
URL: https://github.com/apache/datafusion/issues/23236#issuecomment-4835346248

   > What do we think about updating the documentation on it as historical 
naming and deperecating it with a.warning this will be replaced with 
KeyPartitioning and eventually not be supported.
   
   I think that would be the most friendly way
   
   So basically in the context of 
https://github.com/apache/datafusion/pull/23241 it would look like
   ```rust
   
   /// How data is distributed amongst partitions. See [`Partitioning`] for more
   /// details.
   #[derive(Debug, Clone)]
   pub enum Distribution {
       /// Unspecified distribution
       UnspecifiedDistribution,
       /// A single partition is required
       SinglePartition,
       /// Comments  here about deprecated
       #[deprecated] 
       HashPartitioned(Vec<Arc<dyn PhysicalExpr>>), 
       /// Requires children to be distributed in such a way that the same
       /// values of the keys end up in the same partition
       KeyPartitioned(Vec<Arc<dyn PhysicalExpr>>),
   }
   ```
   
   And then all the `match` statements owuld look like
   
   ```rust
   match dist { 
     Distribution::UnspecifiedDistribution => {..}
     Distribution::SinglePartition => {..}
     Distribution::HashPartitioned(exprs) |  
Distribution::KeyPartitioned(exprs) => { /* treat both the same ... */ }
   }
   ```
     
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to