huaxingao commented on PR #46707:
URL: https://github.com/apache/spark/pull/46707#issuecomment-2209372977

   Thank you all for your thoughtful comments and suggestions. I appreciate the 
discussion around leveraging TVF-like syntax, and I understand the potential 
benefits of using a more SQL-standard approach. However, I would like to 
highlight why I believe the `WITH OPTIONS` syntax remains the most beneficial 
for our current goals:
   
   1. Simplicity and Accessibility:
   The `WITH OPTIONS` syntax is straightforward and directly communicates the 
intent of applying specific options to the SQL query. It's an intuitive 
approach that can be easily understood by users without extensive SQL 
background.
   
   2. Separation of Concerns:
   Using `WITH OPTIONS` cleanly separates the functional part of the SQL query 
from the configuration parameters. This clarity improves code readability and 
maintenance, as opposed to embedding options within a TVF syntax that could 
obscure the primary purpose of the query.
   
   3. Avoiding Over-complexity:
   While TVF-like syntax offers elegance, it introduces a level of complexity 
that may not be necessary. For instance, distinguishing between a table and a 
TVF in queries, as mentioned, can confuse users and complicate the parser's 
job. Our proposed syntax avoids this by keeping the query structure familiar 
and straightforward.
   
   4. Focus on Practical Use Cases:
   The `WITH OPTIONS` syntax is specifically designed to handle practical 
scenarios where users might need to dynamically configure queries based on 
different execution contexts, such as adjusting `fetchSize` for performance 
tuning. This approach is particularly beneficial in environments where such 
configurations are frequently modified.
   
   I propose we continue with the `WITH OPTIONS` syntax for its clarity, ease 
of use, and flexibility. I would like to move this PR forward. 🙂


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