GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||
GeezerVison is showing github.com — feat: support any number/order of merge operations by davidjgoss · Pull Request #1938 · JSQLParser/JSqlParser Conversation
|
|
Greetings! First of all, thank you for your good work and the contribution. So what could be the way forward:
So just maybe, we should keep the Standard Merge and then derive an @wumpz @tomershay @AnEmortalKid @jxnu-liguobin @zaza @gitmotte @tvar Your have contributed the most to the project, so please let us know your opinion on this. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Technically this PR is exceptionally well crafted! No concerns from this side. It's really all about the Snowflake specific syntax and how far we want to go under a RDBMS agnostic approach. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks so much for the fast feedback @manticore-projects - all very fair, and I'm happy to make whatever changes we feel are best overall 👍 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
I want to add one thought: I am using Washing up the syntax may allow for statements appearing valid when not valid on the big four RDBMS. Lets wait a week or so for opinions to hit and then we will make a joint decision. Thank you for understanding. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I have created a Github Poll: #1939 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I don't see it quite so strictly. A validator (FeatureSetValidation/DatabaseType and FeatureSetValidation/Version) can be built/extended to validate which syntax is correct for which RDMS.
I do not use Oracle, I have defined several validators for several widely used RDBMS. Besides the DatabaseType Validation classes ORACLE, MYSQL, SQLSERVER, MARIADB, POSTGRESQL, H2, there is a SQLVersion class that is supposed to define the ANSI SQL standard syntax. However, not all databases are fully ANSI-compatible for all statements.
Deprecation should only take place if the methods are completely outdated or incorrect. I agree that we should keep them.
The class-structure will never fulfill all the requirements of all RDBMSs, so successful parsing will never guarantee a valid statement for an RDBMS. We have this problem in many cases in this library. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
My 2 cents:
I didn't get a chance to look at the specific technical details of this change, so I'm mainly sharing thoughts based on the discussion above and initial understanding of the suggested change. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I think adding one is acceptable if we have standalone support for that database (oracle, mysql,h2,pg). When there is no standalone support (a new database category), it may be more in line with the standard to not accept big changes. I have a similar problem, we are heavily using Doris which uses MySQL driver but still has some special operations and since Doris is not a legacy database and not currently popular, there is no such database category in jsqlparser so I didn't create PR for Doris. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thank you all for your feedback. I read it s supportive as long as the support for the Standard Merge statement stays intact. @davidjgoss Can you please amend your PR in order to make it as compatible as possible to the Standard Merge. E. g. don't deprecate the existing methods and assume that standard count of merge operations = 1 ( 1or zero INSERT and 1 or zero DELETE) -- unless more operations are either APPENDED or SET with an index. Then I would promptly merge the PR. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
e2017b7 to
49115da
Compare
|
@manticore-projects I've pushed a commit that I think addresses this. The original three standard fields in |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Great! Thank you for your contribution and support, much appreciated! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Congrats, your new Snowflake syntax are online: https://manticore-projects.com/JSQLParser/syntax_snapshot.html#merge |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.