alamb commented on PR #3279:
URL: 
https://github.com/apache/arrow-datafusion/pull/3279#issuecomment-1236810215

   > This seems strange to me, in that it will carry over irrelevant syntax 
differences, and also stores redundant information. When I ask postgres to show 
a table, I don't get my raw SQL back, I get back generated SQL that matches the 
definition postgres has an internal representation for.
   
   I agree that most other systems store some sort of "canonicalized" view 
definition.  The sqlparser-rs code offers that the output of `Display` can be 
parsed back into the same structure, so I think we could simply use that 
property (or potentially store the view as a serialized `LogicalPlan`). 
   
   > It bothers me, but I'm not sure if I'm being pedantic I'll leave it to you 
@alamb .
   
   I think the question of "how do we store a view definition" is somewhat 
orthogonal to the feature in this PR to show that view definition (though they 
are of course related!) and I think we can handle it in a follow on
   
   Thus, I plan to file an issue where we can discus the "what to use / how to 
store a view definition" issue and then merge this PR. 
   
   This may also be related to the discussion we are having about view 
implementation on 
https://github.com/apache/arrow-datafusion/issues/3249#issuecomment-1236347394


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

Reply via email to