alamb commented on PR #14392:
URL: https://github.com/apache/datafusion/pull/14392#issuecomment-2637335904

   
   > @andygrove @alamb maybe we can do a conditional compilation on function 
level instead of separate crate? Sort of introduce a feature spark and have 
different implementations
   > 
   > ```
   > #[cfg(spark)]
   > fn to_timestamp() {}
   > 
   > #![cfg(spark)]
   > fn to_timestamp() {}
   > ```
   
   What I was thinking was an either-or type thing. For any particular 
`SessionContext` a user could choose one of the following dialects + functions:
   1. Postgres++ (aka what DataFusion does today)
   2. Spark 
   
   And then users would somehow pick between the two -- perhaps like
   ```rust
   let ctx = SessionContext::new()
     .with_spark_functions()
   ```
   
   Or something
   
   I don't think having functions like `spark_avg` is going to help anyone as 
any one system seems unlikely to want  two different implementations of `avg`. 
   
   I think if we keep the entire function packages separate it would keep the 
implementations eaiser to understand as well (rather than feature gating each 
function)


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