returnString commented on a change in pull request #214:
URL: https://github.com/apache/arrow-datafusion/pull/214#discussion_r622406126



##########
File path: datafusion/src/sql/parser.rs
##########
@@ -21,7 +21,7 @@
 
 use sqlparser::{
     ast::{ColumnDef, ColumnOptionDef, Statement as SQLStatement, 
TableConstraint},
-    dialect::{keywords::Keyword, Dialect, GenericDialect},
+    dialect::{keywords::Keyword, Dialect, PostgreSqlDialect},

Review comment:
       Just to be totally clear, I'm definitely not married to the contents of 
this PR as they stand; if the consensus is that we _do_ want to support 
multiple dialects, I'm happy to rework it towards that goal 🙂
   
   If that's a route we want to explore in depth, we could perhaps build some 
sort of dialect config setup that allows for controlling parser overrides in 
DF, but that feels a bit _too_ heavyweight if we don't have tonnes of use cases 
right now (and hence no-one to drive or own that work).
   
   Here's my immediate idea:
   - revert the deletion of all the logical plan stuff here, and just retain 
the parser override deletion
   - make the dialect default to Postgres, but be configurable, with a doc 
warning mentioning the potential risks and edge cases
   - mention nullary functions as a replacement for scalar variables in SQL in 
the next set of release notes
   - random bonus thought: maybe expose a unary function to retrieve scalar 
variables by name from SQL?
   
   Does that sound vaguely sensible?
   
   Full disclosure: my goal here is to get a DataFusion-powered service 
queryable via BI tooling, and these tools often use the more esoteric features 
of the Postgres dialect to boostrap their UIs (think table listings etc). I 
still have a fair bit of work to do on this, but I can at least sort of see a 
path to having it working now. I suspect this will be beneficial for lots of 
other use cases, but admittedly I don't have any evidence for that claim beyond 
intuition 😅




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

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


Reply via email to