Skip to content

F312 Add grammar support for MERGE #101

Merged
merged 2 commits into from
Aug 29, 2024
Merged

Conversation

makssent
Copy link
Collaborator

Fixes #28.

request: MERGE INTO CUSTOMER USING ( SELECT AGENT_CODE FROM AGENTS WHERE AGENT_CODE = 'A006') AG ON CUSTOMER.AGENT_CODE = AG.AGENT_CODE WHEN MATCHED THEN DELETE
err message: You have an error in your SQL syntax: MERGE INTO agents a USING (SELECT * FROM agents WHERE commission > 0.15) cd ON (a.agent_code = cd.agent_code) WHEN MATCHED THEN UPDATE SET agent_code = cd.agent_code WHEN NOT MATCHED THEN INSERT (agent_code) VALUES (cd.agent_code) no viable alternative at input 'MERGE' at line 1 position 1 near @01:5='MERGE'<340>1:1

new err message:
class org.apache.shardingsphere.sql.parser.sql.common.segment.generic.AliasSegment cannot be cast to class org.apache.shardingsphere.sql.parser.sql.common.segment.generic.table.TableSegment (org.apache.shardingsphere.sql.parser.sql.common.segment.generic.AliasSegment and org.apache.shardingsphere.sql.parser.sql.common.segment.generic.table.TableSegment are in unnamed module of loader 'app')

@TedCraft TedCraft merged commit 46d15af into red-soft-ru:master Aug 29, 2024
14 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add F312 MERGE statement support
2 participants