MrPowers commented on issue #513:
URL: 
https://github.com/apache/datafusion-python/issues/513#issuecomment-3308802573

   @kylebarron - I prefer the Spark parameterized syntax because it's not 
reliant on local scope.  I've fought with the DuckDB syntax in the past cause 
you can lose the scope when you move to a new function, for example.
   
   BTW, it'd be cool if we could parameterize lots of different values, not 
just DataFrames.  This would have been a better example:
   
   ```python
   from datetime import date
   
   ctx.sql("""
       SELECT country, COUNT(*) as num_ppl 
       FROM {person_df} 
       WHERE date_column > {cutoff_date}
       GROUP BY country
   """, 
   person_df=person_df,
   cutoff_date=date(2020, 1, 1)
   ).show()
   ```
   
   The extra bonus point implementation would be if the user could add custom 
parameterization logic for their own objects!


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