Skip to content

[CALCITE-3449] Sync tableName logic from TableScan into TableModify#1541

Closed
pinkdawn wants to merge 2 commits intoapache:masterfrom
pinkdawn:visit-modify-tablename
Closed

[CALCITE-3449] Sync tableName logic from TableScan into TableModify#1541
pinkdawn wants to merge 2 commits intoapache:masterfrom
pinkdawn:visit-modify-tablename

Conversation

@pinkdawn
Copy link

Jira issue: Jira CALCITE-3449

Fix the bug, modify sql(insert/update/delete) will wrongly have sub-schema before the tablename.

sqlTargetTable = new SqlIdentifier(qualifiedName, SqlParserPos.ZERO);
}

return sqlTargetTable;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, the code looks good, can you add a test case in RelToSqlConverterTest ?

// Target Table Name
final SqlIdentifier sqlTargetTable =
new SqlIdentifier(modify.getTable().getQualifiedName(), POS);
final SqlIdentifier sqlTargetTable = getSqlTargetTable(modify);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for this fix ~

@danny0405 danny0405 changed the title [CALCITE-3449] sync tableName logic from TableScan into TableModify [CALCITE-3449] Sync tableName logic from TableScan into TableModify Oct 30, 2019
@danny0405 danny0405 added no-tests-is-ok No tests is also acceptable, because the fix is straightforward LGTM-will-merge-soon Overall PR looks OK. Only minor things left. labels Oct 30, 2019
@danny0405 danny0405 closed this in e12d055 Nov 1, 2019
danny0405 pushed a commit that referenced this pull request Nov 1, 2019
…eModify (dy.Zhuang)

When sending queries to target databse, sub schemas should be removed
from the sql.

close #1541
XuQianJin-Stars pushed a commit to XuQianJin-Stars/calcite that referenced this pull request Nov 17, 2019
…eModify (dy.Zhuang)

When sending queries to target databse, sub schemas should be removed
from the sql.

close apache#1541
XuQianJin-Stars pushed a commit to XuQianJin-Stars/calcite that referenced this pull request Nov 20, 2019
…eModify (dy.Zhuang)

When sending queries to target databse, sub schemas should be removed
from the sql.

close apache#1541
XuQianJin-Stars pushed a commit to XuQianJin-Stars/calcite that referenced this pull request Nov 20, 2019
…eModify (dy.Zhuang)

When sending queries to target databse, sub schemas should be removed
from the sql.

close apache#1541
wangxlong pushed a commit to wangxlong/calcite that referenced this pull request Feb 13, 2020
…eModify (dy.Zhuang)

When sending queries to target databse, sub schemas should be removed
from the sql.

close apache#1541
jamesstarr pushed a commit to jamesstarr/calcite that referenced this pull request Aug 28, 2025
…eModify (dy.Zhuang)

When sending queries to target databse, sub schemas should be removed
from the sql.

close apache#1541

Change-Id: I86893993ff268f5cfe376dd29f16f8fc2db121f8
jamesstarr pushed a commit to jamesstarr/calcite that referenced this pull request Mar 16, 2026
…eModify (dy.Zhuang)

When sending queries to target databse, sub schemas should be removed
from the sql.

close apache#1541

Change-Id: I86893993ff268f5cfe376dd29f16f8fc2db121f8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

LGTM-will-merge-soon Overall PR looks OK. Only minor things left. no-tests-is-ok No tests is also acceptable, because the fix is straightforward

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants