You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Stanilovsky Evgeny (Jira)" <ji...@apache.org> on 2021/01/20 09:42:00 UTC

[jira] [Updated] (IGNITE-14019) Calcite bug. Can`t access cache created on the server side from client node.

     [ https://issues.apache.org/jira/browse/IGNITE-14019?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stanilovsky Evgeny updated IGNITE-14019:
----------------------------------------
     Attachment: SqlFieldsQueryUsageTest.java
    Description: 
table created from server node

{code:java}
        IgniteCache<Integer, Integer> devCache = grid(0).createCache(projCfg);

        assertFalse(grid(0).configuration().isClientMode());
{code}
and accessed from client :

{code:java}
node.context().query().querySqlFields(new SqlFieldsQuery(sql).setSchema("PUBLIC"), true).getAll();
{code}

throws: 

{code:java}
java.lang.NullPointerException
	at org.apache.ignite.internal.processors.query.calcite.schema.TableDescriptorImpl.distribution(TableDescriptorImpl.java:197)
	at org.apache.ignite.internal.processors.query.calcite.schema.IgniteTableImpl.distribution(IgniteTableImpl.java:121)
	at org.apache.ignite.internal.processors.query.calcite.schema.IgniteTableImpl.toRel(IgniteTableImpl.java:89)
	at org.apache.ignite.internal.processors.query.calcite.schema.IgniteTable.toRel(IgniteTable.java:61)
	at org.apache.ignite.internal.processors.query.calcite.schema.IgniteTable.toRel(IgniteTable.java:40)
	at org.apache.calcite.prepare.RelOptTableImpl.toRel(RelOptTableImpl.java:285)
	at org.apache.calcite.sql2rel.SqlToRelConverter.toRel(SqlToRelConverter.java:3585)
	at org.apache.calcite.sql2rel.SqlToRelConverter.convertIdentifier(SqlToRelConverter.java:2507)
	at org.apache.calcite.sql2rel.SqlToRelConverter.convertFrom(SqlToRelConverter.java:2144)
	at org.apache.calcite.sql2rel.SqlToRelConverter.convertFrom(SqlToRelConverter.java:2093)
	at org.apache.calcite.sql2rel.SqlToRelConverter.convertFrom(SqlToRelConverter.java:2050)
	at org.apache.calcite.sql2rel.SqlToRelConverter.convertSelectImpl(SqlToRelConverter.java:663)
	at org.apache.calcite.sql2rel.SqlToRelConverter.convertSelect(SqlToRelConverter.java:644)
	at org.apache.calcite.sql2rel.SqlToRelConverter.convertQueryRecursive(SqlToRelConverter.java:3438)
	at org.apache.calcite.sql2rel.SqlToRelConverter.convertQuery(SqlToRelConverter.java:570)
	at org.apache.ignite.internal.processors.query.calcite.prepare.IgnitePlanner.rel(IgnitePlanner.java:211)
	at org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.optimize(ExecutionServiceImpl.java:600)
	at org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.prepareQuery(ExecutionServiceImpl.java:568)
	at org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.prepareSingle(ExecutionServiceImpl.java:542)
	at org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.prepareQuery(ExecutionServiceImpl.java:501)
	at org.apache.ignite.internal.processors.query.calcite.prepare.QueryPlanCacheImpl.queryPlan(QueryPlanCacheImpl.java:84)
	at org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.executeQuery(ExecutionServiceImpl.java:378)
	at org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.query(CalciteQueryProcessor.java:241)
	at org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2841)
	at org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2766)
	at org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2739)
	at org.apache.ignite.internal.processors.query.calcite.SqlFieldsQueryUsageTest.execute(SqlFieldsQueryUsageTest.java:99)
	at org.apache.ignite.internal.processors.query.calcite.SqlFieldsQueryUsageTest.createCacheOnSrvCallOnCli(SqlFieldsQueryUsageTest.java:89)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.apache.ignite.testframework.junits.GridAbstractTest$7.run(GridAbstractTest.java:2375)
	at java.lang.Thread.run(Thread.java:748)
{code}

reproduser atached

> Calcite bug. Can`t access cache created on the server side from client node.
> ----------------------------------------------------------------------------
>
>                 Key: IGNITE-14019
>                 URL: https://issues.apache.org/jira/browse/IGNITE-14019
>             Project: Ignite
>          Issue Type: Improvement
>          Components: sql
>            Reporter: Stanilovsky Evgeny
>            Priority: Major
>              Labels: calcite
>         Attachments: SqlFieldsQueryUsageTest.java
>
>
> table created from server node
> {code:java}
>         IgniteCache<Integer, Integer> devCache = grid(0).createCache(projCfg);
>         assertFalse(grid(0).configuration().isClientMode());
> {code}
> and accessed from client :
> {code:java}
> node.context().query().querySqlFields(new SqlFieldsQuery(sql).setSchema("PUBLIC"), true).getAll();
> {code}
> throws: 
> {code:java}
> java.lang.NullPointerException
> 	at org.apache.ignite.internal.processors.query.calcite.schema.TableDescriptorImpl.distribution(TableDescriptorImpl.java:197)
> 	at org.apache.ignite.internal.processors.query.calcite.schema.IgniteTableImpl.distribution(IgniteTableImpl.java:121)
> 	at org.apache.ignite.internal.processors.query.calcite.schema.IgniteTableImpl.toRel(IgniteTableImpl.java:89)
> 	at org.apache.ignite.internal.processors.query.calcite.schema.IgniteTable.toRel(IgniteTable.java:61)
> 	at org.apache.ignite.internal.processors.query.calcite.schema.IgniteTable.toRel(IgniteTable.java:40)
> 	at org.apache.calcite.prepare.RelOptTableImpl.toRel(RelOptTableImpl.java:285)
> 	at org.apache.calcite.sql2rel.SqlToRelConverter.toRel(SqlToRelConverter.java:3585)
> 	at org.apache.calcite.sql2rel.SqlToRelConverter.convertIdentifier(SqlToRelConverter.java:2507)
> 	at org.apache.calcite.sql2rel.SqlToRelConverter.convertFrom(SqlToRelConverter.java:2144)
> 	at org.apache.calcite.sql2rel.SqlToRelConverter.convertFrom(SqlToRelConverter.java:2093)
> 	at org.apache.calcite.sql2rel.SqlToRelConverter.convertFrom(SqlToRelConverter.java:2050)
> 	at org.apache.calcite.sql2rel.SqlToRelConverter.convertSelectImpl(SqlToRelConverter.java:663)
> 	at org.apache.calcite.sql2rel.SqlToRelConverter.convertSelect(SqlToRelConverter.java:644)
> 	at org.apache.calcite.sql2rel.SqlToRelConverter.convertQueryRecursive(SqlToRelConverter.java:3438)
> 	at org.apache.calcite.sql2rel.SqlToRelConverter.convertQuery(SqlToRelConverter.java:570)
> 	at org.apache.ignite.internal.processors.query.calcite.prepare.IgnitePlanner.rel(IgnitePlanner.java:211)
> 	at org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.optimize(ExecutionServiceImpl.java:600)
> 	at org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.prepareQuery(ExecutionServiceImpl.java:568)
> 	at org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.prepareSingle(ExecutionServiceImpl.java:542)
> 	at org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.prepareQuery(ExecutionServiceImpl.java:501)
> 	at org.apache.ignite.internal.processors.query.calcite.prepare.QueryPlanCacheImpl.queryPlan(QueryPlanCacheImpl.java:84)
> 	at org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.executeQuery(ExecutionServiceImpl.java:378)
> 	at org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.query(CalciteQueryProcessor.java:241)
> 	at org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2841)
> 	at org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2766)
> 	at org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2739)
> 	at org.apache.ignite.internal.processors.query.calcite.SqlFieldsQueryUsageTest.execute(SqlFieldsQueryUsageTest.java:99)
> 	at org.apache.ignite.internal.processors.query.calcite.SqlFieldsQueryUsageTest.createCacheOnSrvCallOnCli(SqlFieldsQueryUsageTest.java:89)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:498)
> 	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> 	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> 	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> 	at org.apache.ignite.testframework.junits.GridAbstractTest$7.run(GridAbstractTest.java:2375)
> 	at java.lang.Thread.run(Thread.java:748)
> {code}
> reproduser atached



--
This message was sent by Atlassian Jira
(v8.3.4#803005)