[
https://issues.apache.org/jira/browse/IGNITE-14553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17325087#comment-17325087
]
Aleksey Plekhanov edited comment on IGNITE-14553 at 4/19/21, 3:41 PM:
----------------------------------------------------------------------
Without MVCC already inserted by the current query data can be processed by
this query again.
Here one more reproducer to show this issue:
{code:java}
public void testInsertAsSelect() throws Exception {
QueryEngine engine = Commons.lookupComponent(grid(1).context(),
QueryEngine.class);
engine.query(null, "PUBLIC", "CREATE TABLE test (epoch_cur int,
epoch_copied int)");
engine.query(null, "PUBLIC", "INSERT INTO test VALUES (0,
0)").get(0).getAll();
for (int i = 1; i < 16; i++) {
engine.query(null, "PUBLIC", "INSERT INTO test SELECT ?, epoch_cur FROM
test", i).get(0).getAll();
List<List<?>> rows = engine.query(null, "PUBLIC", "SELECT * FROM test
WHERE epoch_copied = ?", i).get(0).getAll();
assertEquals("Unexpected rows for epoch " + i, 0, rows.size());
}
}
{code}
was (Author: alex_pl):
Without MVCC already inserted by the current query data can be processed by
this query again.
Here one more reproducer to show this issue:
{code:java}
public void testInsertAsSelect() throws Exception {
QueryEngine engine = Commons.lookupComponent(grid(1).context(),
QueryEngine.class);
engine.query(null, "PUBLIC", "CREATE TABLE test (epoch_cur int,
epoch_copied int)");
engine.query(null, "PUBLIC", "INSERT INTO test VALUES (0,
0)").get(0).getAll();
for (int i = 1; i < 16; i++) {
engine.query(null, "PUBLIC", "INSERT INTO test SELECT ?, epoch_cur FROM
test", i).get(0).getAll();
List<List<?>> rows = engine.query(null, "PUBLIC", "SELECT * FROM test
WHERE epoch_copied = ?", i).get(0).getAll();
assertEquals("Unexpected rows for epoch " + i, rows.size(), 0);
}
}
{code}
> Calcite engine. Duplicated result on insert
> -------------------------------------------
>
> Key: IGNITE-14553
> URL: https://issues.apache.org/jira/browse/IGNITE-14553
> Project: Ignite
> Issue Type: Bug
> Components: sql
> Reporter: Konstantin Orlov
> Priority: Blocker
>
> Please see the test
> {{modules/calcite/src/test/sql/types/string/test_scan_big_varchar.test_ignore}}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)