You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "lichad (Jira)" <ji...@apache.org> on 2022/11/30 02:05:00 UTC

[jira] [Comment Edited] (IGNITE-18119) SqlFieldsQuery,setLocal does not work

    [ https://issues.apache.org/jira/browse/IGNITE-18119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17641033#comment-17641033 ] 

lichad edited comment on IGNITE-18119 at 11/30/22 2:04 AM:
-----------------------------------------------------------

I wrote a query code in the server computing task, The cache corresponding to the FIGLACCDOCENTRY2020D table is partitioned (affinitykey is ACCTITLECODE). I set the query to be executed locally, but the query result of each node is full data:

IgniteCache cache = ignite.getOrCreateCache("FIQUERYSUBLEDGER_TEMP").withKeepBinary();

SqlFieldsQuery query = new SqlFieldsQuery("SELECT ID,ABSTRACT,ACCTITLECODE as ACCDOCCODE,BIZDATE as ACCDOCDATE,ACCORGID,PERIODCODE as ACCPERIODCODE,ACCTITLECODE,'1' as FLAG FROM FIGLCHEMA.FIGLACCDOCENTRY2020D WHERE PERIODCODE>='02' AND LEDGER IN ('4A1708200A1445279994BEF0CFF8E44E','58ACE67D63D243B79604049416CF7BA1') order by ACCTITLECODE,PERIODCODE,BIZDATE");
query.setDistributedJoins(false);
query.setLocal(true);

List<List<?>> list = cache.query(query).getAll();

 

Please help me to see what is wrong, thank you very much!

 


was (Author: JIRAUSER298348):
I wrote a query code in the server computing task, including FIGLCHEMA The cache corresponding to the FIGLACCDOCENTRY2020D table is partitioned (affinitykey is ACCTITLECODE). I set the query to be executed locally, but the query result of each node is full data:

IgniteCache cache = ignite.getOrCreateCache("FIQUERYSUBLEDGER_TEMP").withKeepBinary();

SqlFieldsQuery query = new SqlFieldsQuery("SELECT ID,ABSTRACT,ACCTITLECODE as ACCDOCCODE,BIZDATE as ACCDOCDATE,ACCORGID,PERIODCODE as ACCPERIODCODE,ACCTITLECODE,'1' as FLAG FROM FIGLCHEMA.FIGLACCDOCENTRY2020D WHERE PERIODCODE>='02' AND LEDGER IN ('4A1708200A1445279994BEF0CFF8E44E','58ACE67D63D243B79604049416CF7BA1') order by ACCTITLECODE,PERIODCODE,BIZDATE");
query.setDistributedJoins(false);
query.setLocal(true);

List<List<?>> list = cache.query(query).getAll();

 

Please help me to see what is wrong, thank you very much!

 

> SqlFieldsQuery,setLocal does not work
> -------------------------------------
>
>                 Key: IGNITE-18119
>                 URL: https://issues.apache.org/jira/browse/IGNITE-18119
>             Project: Ignite
>          Issue Type: Bug
>    Affects Versions: 2.14
>            Reporter: lichad
>            Priority: Major
>
> In version 2.13, it still works normally. In version 2.14, "setlocal (true)" does not work regardless of the cacite or h2 engine.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)