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

   I like this syntax `ctx.sql("select c_custkey, c_name from {df}", 
df=df_customer)`.
   
   The `ctx.sql("select c_custkey, c_name from df_customer")`, which relies on 
a `df_customer` variable being defined in the local scope works ok in a 
notebook, but breaks down in an application with functions where the local 
scope is changing a lot.
   
   I ran into the pain point of direct injection when using DuckDB in a 
project.  I was reading the tables in one function and then trying to access 
them in another function, but they were not accessible.  Let me double check 
this tho.
   
   Spark & Daft use parameterized queries, which work better, in my experience.


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