I have a query like this:

SELECT
> tbl.id AS tbl_id, tbl.releaseId AS tbl_releaseId, col.type AS col_type
> FROM T0 tbl
> INNER JOIN T1 col ON tbl.id = col.tableId
> *WHERE tbl.releaseId = ? AND tbl.name <http://tbl.name> = ?*
> LIMIT 100
>

This returns no results so after investigating, I ended up changing it to
the below

SELECT
> tbl.id AS tbl_id, tbl.releaseId AS tbl_releaseId, col.type AS col_type
> FROM *(SELECT * FROM T0 t WHERE t.releaseId = ? AND t.name
> <http://t.name> = ?) *tbl
> INNER JOIN T1 col ON tbl.id = col.tableId
> LIMIT 100
>

 This returns the results expected.
Can anyone offer any insight into what is going wrong here?

The tables here look like this (I removed some columns from the tables and
the query to help make it easier on the eyes to parse):

CREATE TABLE IF NOT EXISTS T0
> (
>   id        LONG,
>   releaseId VARCHAR,
>   name      VARCHAR,
>   PRIMARY KEY (releaseId, id)
> ) WITH "template=hypi_tpl,affinity_key=releaseId";

CREATE INDEX IF NOT EXISTS VirtualTable_idx0 ON VirtualTable (releaseId,
> name);
>
> CREATE TABLE IF NOT EXISTS T1
> (
>   id      LONG,
>   t0Id LONG,
>   name    VARCHAR,
>   type    VARCHAR,
>   PRIMARY KEY (t0Id, id)
> ) WITH "template=hypi_tpl,affinity_key=t0Id";
>

Note here it is a single node locally (so I don't expect collocation issues
to be in play here) - in development so not in a production cluster yet.
Running Ignite 2.8.0

This is not the first time we've had something like this but it's the first
time I've been able to reproduce it myself and consistently.

Best,
Courtney

Reply via email to