apache / shardingsphere

Empowering Data Intelligence with Distributed SQL for Sharding, Scalability, and Security Across All Databases.
Apache License 2.0
19.9k stars 6.73k forks source link

Support MySQL/Oracle update statement convert to SqlUpdate to improve sql federation support #27378

Open strongduanmu opened 1 year ago

strongduanmu commented 1 year ago

Background

On the master branch, SQLNodeConverterEngine already supports the conversion of most SelectStatement statements, which provides a good foundation for sql federation. In order to improve the support of sql federation for update statements and complex statements such as update join, we need to support the conversion of UpdateStatement in SQLNodeConverterEngine.

MySQL update statement doc - https://dev.mysql.com/doc/refman/8.0/en/update.html

UPDATE [LOW_PRIORITY] [IGNORE] table_reference
    SET assignment_list
    [WHERE where_condition]
    [ORDER BY ...]
    [LIMIT row_count]

value:
    {expr | DEFAULT}

assignment:
    col_name = value

assignment_list:
    assignment [, assignment] ...

UPDATE [LOW_PRIORITY] [IGNORE] table_references
    SET assignment_list
    [WHERE where_condition]

Oracle update statement doc - https://docs.oracle.com/en/database/oracle/oracle-database/21/sqlrf/UPDATE.html#GUID-027A462D-379D-4E35-8611-410F3AC8FDA5

Task

zihaoAK47 commented 1 year ago

Hi mentor, in order for SQL Federation to support update statements and support explain update, I would like to solve this problem. Please assign it to me. Thank you

github-actions[bot] commented 1 year ago

There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.

github-actions[bot] commented 11 months ago

There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.