You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from (table_name) is not actually valid SQL. Note that <table primary> in the ANSI SQL grammar does not allow parentheses around <table or query name>. A quick test shows that at least MS SQL Server follows the spec here. What database are you working with?
Theoretically, yes. Practically in the current implementation the selected dialect only affects the tokenizer, and the parser unconditionally tries to parse some non-standard constructs.
I guess so, if it's going to be a simple change, that doesn't introduce problems parsing the standard syntax (this specific bit of the parser is quite complex as it is). @benesch what do you think?
Activity
nickolay commentedon Mar 31, 2020
from (table_name)is not actually valid SQL. Note that<table primary>in the ANSI SQL grammar does not allow parentheses around<table or query name>. A quick test shows that at least MS SQL Server follows the spec here. What database are you working with?eyalleshem commentedon Mar 31, 2020
Thanks for the fast response :)
I tested against snowflake ..
Is that something that could be solve by building a dialect ?
nickolay commentedon Mar 31, 2020
Theoretically, yes. Practically in the current implementation the selected dialect only affects the tokenizer, and the parser unconditionally tries to parse some non-standard constructs.
eyalleshem commentedon Mar 31, 2020
So a code that support such syntax could be accepted?
nickolay commentedon Mar 31, 2020
I guess so, if it's going to be a simple change, that doesn't introduce problems parsing the standard syntax (this specific bit of the parser is quite complex as it is). @benesch what do you think?
eyalleshem commentedon Mar 31, 2020
well - i tried :)
nickolay commentedon Apr 21, 2020
PR #155 is now merged, closing this. Thanks!
[snowflake] Support specifying an alias after `FROM (table_factor)`