You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "strongduanmu (via GitHub)" <gi...@apache.org> on 2025/09/16 09:09:28 UTC
[I] Optimize MySQL INSERT INTO VALUES AS row_alias parse SQLStatement [shardingsphere]
strongduanmu opened a new issue, #36583:
URL: https://github.com/apache/shardingsphere/issues/36583
## Feature Request
### Is your feature request related to a problem?
No
### Describe the feature you would like.
Currently, ShardingSphere MySQL parsing engine does not fully support MySQL INSERT INTO VALUES AS row_alias parsing. The AS row_alias part is not correctly parsed into the SQLStatement object. In addition, the expression in ON DUPLCIATE KEY UPDATE is not processed correctly and only CommonExpressionSegment is used to represent it.
```sql
<test-case sql="INSERT INTO t_order VALUES (?, ?, ?, ?, 'test', '2017-08-08'), (?, ?, ?, ?, 'test', '2017-08-08') AS new_order ON DUPLICATE KEY UPDATE status = new_order.status" scenario-types="sphereex_db_tbl_sql_federation" db-types="MySQL">
<assertion parameters="1000:int,10:int,insert:String,1:int,1200:int,12:int,insert:String,1:int" expected-data-file="insert_values_row_on_duplicate_key_update_for_sphereex_db_tbl_sql_federation.xml" />
</test-case>
<test-case sql="INSERT INTO t_order VALUES (?, ?, ?, ?, 'test', '2017-08-08'), (?, ?, ?, ?, 'test', '2017-08-08') AS new_order(order_id, user_id, status, merchant_id, remark, creation_date) ON DUPLICATE KEY UPDATE status = new_order.status" scenario-types="sphereex_db_tbl_sql_federation" db-types="MySQL">
<assertion parameters="1000:int,10:int,insert:String,1:int,1200:int,12:int,insert:String,1:int" expected-data-file="insert_values_row_on_duplicate_key_update_for_sphereex_db_tbl_sql_federation.xml" />
</test-case>
```
<img width="1406" height="862" alt="Image" src="https://github.com/user-attachments/assets/1ac6a59c-4a28-4b1c-b05b-ea186594454e" />
--
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: notifications-unsubscribe@shardingsphere.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Optimize MySQL INSERT INTO VALUES AS row_alias parse SQLStatement [shardingsphere]
Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu closed issue #36583: Optimize MySQL INSERT INTO VALUES AS row_alias parse SQLStatement
URL: https://github.com/apache/shardingsphere/issues/36583
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Optimize MySQL INSERT INTO VALUES AS row_alias parse SQLStatement [shardingsphere]
Posted by "chakkk309 (via GitHub)" <gi...@apache.org>.
chakkk309 commented on issue #36583:
URL: https://github.com/apache/shardingsphere/issues/36583#issuecomment-3297627965
Hi, I want to have a try~
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Optimize MySQL INSERT INTO VALUES AS row_alias parse SQLStatement [shardingsphere]
Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu commented on issue #36583:
URL: https://github.com/apache/shardingsphere/issues/36583#issuecomment-3297856744
@chakkk309 Welcome back, I will assign it to you.
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org