[
https://issues.apache.org/jira/browse/IGNITE-11563?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16814801#comment-16814801
]
Pavel Kuznetsov edited comment on IGNITE-11563 at 4/29/19 4:07 PM:
-------------------------------------------------------------------
bug is that we use {{BPlusTree#findOne}} that has the same issue with
BigDecimal 1 and 1.0
https://github.com/apache/ignite/blob/af041491423cc2c91668de3790a81e3631bcfa5c/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2TreeIndex.java#L353
UPD: It's a partition pruning issue: partition is based on the hash, but
BigDecimals 1.0 and 1 have different hashes, so partition number is bad and
filter used in the H2TreeIndex is invalid too. For the replicated caches that
filter is not used.
was (Author: pkouznet):
bug is that we use {{BPlusTree#findOne}} that has the same issue with
BigDecimal 1 and 1.0
https://github.com/apache/ignite/blob/af041491423cc2c91668de3790a81e3631bcfa5c/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2TreeIndex.java#L353
> DELETE WHERE does not work in prepared statements
> -------------------------------------------------
>
> Key: IGNITE-11563
> URL: https://issues.apache.org/jira/browse/IGNITE-11563
> Project: Ignite
> Issue Type: Bug
> Components: sql
> Affects Versions: 2.7
> Reporter: Stefan
> Assignee: Pavel Kuznetsov
> Priority: Minor
> Time Spent: 10m
> Remaining Estimate: 0h
>
> With SQL I cannot delete a row using a prepared statement. The following
> statement is simply ignored:
> {{DELETE}} {{FROM}} {{AnyTable WHERE}} {{id = ?}}
> This happens with JDBC-Thin and with ODBC so I suspect that the cluster gets
> the correct data but handles it wrong. By adding an always-true-condition it
> works as expected:
> {{DELETE}} {{FROM}} {{AnyTable WHERE}} {{id = id AND}} {{id = ?}}
> I tested with a very simple table that was created with:
> {{CREATE TABLE testtable (}}
> {{ "ID" NUMBER(19,0),}}
> {{ "VALUE" VARCHAR2(255 CHAR),}}
> {{ PRIMARY KEY (ID)}}
> {{) WITH "template=replicated,cache_name=testtable"}}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)