Skip to content

[Rewrite] Check INSERT tuples belong on different shards before rewriting #1012

@levkk

Description

@levkk

Currently, the multi-row INSERT rewrite doesn't check the values and blindly rewrites the statement into one INSERT per value tuple. Perform a value/shard check instead, and if all values belong to one shard, skip the rewrite and send the statement as-is to the destination shard.

Example

INSERT INTO sharded_table (id, value) VALUES (1, 2), (2, 2)

Same sharding key - same shard, no need to split.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions