[jira] [Commented] (IGNITE-13744) Calcite. Use TableSpool for IgniteNestedLoopJoin

2021-07-23 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-13744:
-

[~korlov] i rewrite PR take into account you *Spool serialization suggestions, 
i also fix (Table|Index)Scan costs, seems in ai master it more efficient.

> Calcite. Use TableSpool for IgniteNestedLoopJoin
> 
>
> Key: IGNITE-13744
> URL: https://issues.apache.org/jira/browse/IGNITE-13744
> Project: Ignite
>  Issue Type: Bug
>  Components: sql
>Reporter: Taras Ledkov
>Assignee: Stanilovsky Evgeny
>Priority: Minor
>  Labels: calcite, calcite2-required, calcite3-required
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Now {{NestedLoopJoinNode}} uses internal buffer to save all rows of the right 
> input.
> We have to do refactoring {{IgniteNestedLoopJoin}} to use rewind of the right 
> input and use TableSpool for not rewindable inputs.
> This refactoring separates implementation the join logic from materialization 
> of the right input if it is needed. In the future we can use disk offload for 
> TableSpool etc.



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


[jira] [Updated] (IGNITE-15127) Calcite. Investigate CoreRules.JOIN_COMMUTE[_OUTER] usage.

2021-07-20 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny updated IGNITE-15127:

Labels: calcite calcite3-required  (was: calcite calcite2-required 
calcite3-required)

> Calcite. Investigate CoreRules.JOIN_COMMUTE[_OUTER] usage.
> --
>
> Key: IGNITE-15127
> URL: https://issues.apache.org/jira/browse/IGNITE-15127
> Project: Ignite
>  Issue Type: Improvement
>  Components: sql
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Major
>  Labels: calcite, calcite3-required
>  Time Spent: 2.5h
>  Remaining Estimate: 0h
>
> Looks like join commute rule can dramatically reduce some join costs, 
> investigation and tests are required.



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


[jira] [Commented] (IGNITE-13136) Calcite integration. Improve join predicate testing.

2021-07-20 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-13136:
-

[~alex_pl] thanks ! i fixed all your comments instead of public interface, can 
u check it ?

> Calcite integration. Improve join predicate testing.
> 
>
> Key: IGNITE-13136
> URL: https://issues.apache.org/jira/browse/IGNITE-13136
> Project: Ignite
>  Issue Type: Improvement
>  Components: sql
>Reporter: Roman Kondakov
>Assignee: Stanilovsky Evgeny
>Priority: Minor
>  Labels: calcite, calcite2-required, calcite3-required
>  Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> Currently we have to merge joining rows in order to test a join predicate:
> {code:java}
> Row row = handler.concat(left, rightMaterialized.get(rightIdx++));
> if (!cond.test(row))
> continue;
> {code}
> it results in unconditional building a joined row even if it will not be 
> emitted to downstream further. To avoid extra GC pressure we need to test the 
> join predicate before joining rows:
> {code:java}
> if (!cond.test(left, right))
> continue;
> Row row = handler.concat(left, right);
> {code}



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


[jira] [Commented] (IGNITE-14857) Calcite integration. ALTER TABLE support

2021-07-19 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-14857:
-

[~alex_pl] thanks, looks good.

> Calcite integration. ALTER TABLE support
> 
>
> Key: IGNITE-14857
> URL: https://issues.apache.org/jira/browse/IGNITE-14857
> Project: Ignite
>  Issue Type: New Feature
>  Components: sql
>Reporter: Yury Gerzhedovich
>Assignee: Aleksey Plekhanov
>Priority: Major
>  Labels: calcite2-required, calcite3-required
>  Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> We need to support DDL commands. The task about the support of ALTER TABLE  
> ADD/DROP/ALTER COLUMN.



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


[jira] [Assigned] (IGNITE-13136) Calcite integration. Improve join predicate testing.

2021-07-17 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny reassigned IGNITE-13136:
---

Assignee: Stanilovsky Evgeny

> Calcite integration. Improve join predicate testing.
> 
>
> Key: IGNITE-13136
> URL: https://issues.apache.org/jira/browse/IGNITE-13136
> Project: Ignite
>  Issue Type: Improvement
>  Components: sql
>Reporter: Roman Kondakov
>Assignee: Stanilovsky Evgeny
>Priority: Minor
>  Labels: calcite2-required, calcite3-required
>
> Currently we have to merge joining rows in order to test a join predicate:
> {code:java}
> Row row = handler.concat(left, rightMaterialized.get(rightIdx++));
> if (!cond.test(row))
> continue;
> {code}
> it results in unconditional building a joined row even if it will not be 
> emitted to downstream further. To avoid extra GC pressure we need to test the 
> join predicate before joining rows:
> {code:java}
> if (!cond.test(left, right))
> continue;
> Row row = handler.concat(left, right);
> {code}



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


[jira] [Commented] (IGNITE-15127) Calcite. Investigate CoreRules.JOIN_COMMUTE[_OUTER] usage.

2021-07-16 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-15127:
-

[~tledkov-gridgain], [~korlov] pr is ready for review.

> Calcite. Investigate CoreRules.JOIN_COMMUTE[_OUTER] usage.
> --
>
> Key: IGNITE-15127
> URL: https://issues.apache.org/jira/browse/IGNITE-15127
> Project: Ignite
>  Issue Type: Improvement
>  Components: sql
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Major
>  Labels: calcite, calcite2-required, calcite3-required
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Looks like join commute rule can dramatically reduce some join costs, 
> investigation and tests are required.



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


[jira] [Created] (IGNITE-15127) Calcite. Investigate CoreRules.JOIN_COMMUTE[_OUTER] usage.

2021-07-15 Thread Stanilovsky Evgeny (Jira)
Stanilovsky Evgeny created IGNITE-15127:
---

 Summary: Calcite. Investigate CoreRules.JOIN_COMMUTE[_OUTER] usage.
 Key: IGNITE-15127
 URL: https://issues.apache.org/jira/browse/IGNITE-15127
 Project: Ignite
  Issue Type: Improvement
  Components: sql
Reporter: Stanilovsky Evgeny
Assignee: Stanilovsky Evgeny


Looks like join commute rule can dramatically reduce some join costs, 
investigation and tests are required.



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


[jira] [Commented] (IGNITE-15122) Calcite. Remove sync mode of RootNode#closeInternal

2021-07-15 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-15122:
-

looks good.

> Calcite. Remove sync mode of RootNode#closeInternal
> ---
>
> Key: IGNITE-15122
> URL: https://issues.apache.org/jira/browse/IGNITE-15122
> Project: Ignite
>  Issue Type: Bug
>  Components: sql
>Reporter: Konstantin Orlov
>Assignee: Konstantin Orlov
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Currently we are waiting on future to complete inside RootNode#closeInternal. 
> It potentially could causes a query to stale in case someone will invoke this 
> method inside a taskExecutor.



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


[jira] [Comment Edited] (IGNITE-15076) Calcite. ignite.[sh|bat] node runner script failed to start instance.

2021-07-14 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny edited comment on IGNITE-15076 at 7/14/21, 6:30 AM:
---

[~tledkov-gridgain] it`s safe to merge it into ai-3 too, i hope.


was (Author: zstan):
[~tledkov-gridgain] it`s safe to marge it into ai-3 too, i hope.

> Calcite. ignite.[sh|bat] node runner script failed to start instance.
> -
>
> Key: IGNITE-15076
> URL: https://issues.apache.org/jira/browse/IGNITE-15076
> Project: Ignite
>  Issue Type: Bug
>  Components: sql
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Major
>  Labels: calcite, calcite3-required
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Found that node runner script failed with trace:
> {noformat}
> java.lang.ExceptionInInitializerError
> at 
> org.apache.calcite.tools.Frameworks$ConfigBuilder.(Frameworks.java:241)
> at 
> org.apache.calcite.tools.Frameworks$ConfigBuilder.(Frameworks.java:217)
> at 
> org.apache.calcite.tools.Frameworks.newConfigBuilder(Frameworks.java:201)
> at 
> org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.(CalciteQueryProcessor.java:73)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:264)
> at 
> org.apache.ignite.internal.util.IgniteUtils.inClassPath(IgniteUtils.java:1754)
> at 
> org.apache.ignite.internal.IgniteComponentType.inClassPath(IgniteComponentType.java:181)
> at 
> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:1267)
> at 
> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:2141)
> at 
> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1787)
> at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1172)
> at 
> org.apache.ignite.internal.IgnitionEx.startConfigurations(IgnitionEx.java:1066)
> at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:952)
> at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:851)
> at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:721)
> at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:690)
> at org.apache.ignite.Ignition.start(Ignition.java:353)
> at 
> org.apache.ignite.startup.cmdline.CommandLineStartup.main(CommandLineStartup.java:367)
> Caused by: java.lang.NullPointerException
> at 
> sun.reflect.annotation.TypeAnnotationParser.mapTypeAnnotations(TypeAnnotationParser.java:356)
> at 
> sun.reflect.annotation.AnnotatedTypeFactory$AnnotatedTypeBaseImpl.(AnnotatedTypeFactory.java:139)
> at 
> sun.reflect.annotation.AnnotatedTypeFactory.buildAnnotatedType(AnnotatedTypeFactory.java:65)
> at 
> sun.reflect.annotation.TypeAnnotationParser.buildAnnotatedType(TypeAnnotationParser.java:79)
> at 
> java.lang.reflect.Executable.getAnnotatedReturnType0(Executable.java:640)
> at java.lang.reflect.Method.getAnnotatedReturnType(Method.java:648)
> at 
> org.apache.calcite.util.ImmutableBeans.makeDef(ImmutableBeans.java:146)
> at 
> org.apache.calcite.util.ImmutableBeans.access$000(ImmutableBeans.java:55)
> at 
> org.apache.calcite.util.ImmutableBeans$1.load(ImmutableBeans.java:68)
> at 
> org.apache.calcite.util.ImmutableBeans$1.load(ImmutableBeans.java:65)
> at 
> com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)
> at 
> com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2276)
> at 
> com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2154)
> at 
> com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2044)
> at com.google.common.cache.LocalCache.get(LocalCache.java:3951)
> at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3973)
> at 
> com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4957)
> at 
> org.apache.calcite.util.ImmutableBeans.create_(ImmutableBeans.java:95)
> at 
> org.apache.calcite.util.ImmutableBeans.create(ImmutableBeans.java:76)
> at 
> org.apache.calcite.sql.validate.SqlValidator$Config.(SqlValidator.java:792)
> ... 19 more
> {noformat}



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


[jira] [Commented] (IGNITE-15076) Calcite. ignite.[sh|bat] node runner script failed to start instance.

2021-07-14 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-15076:
-

[~tledkov-gridgain] it`s safe to marge it into ai-3 too, i hope.

> Calcite. ignite.[sh|bat] node runner script failed to start instance.
> -
>
> Key: IGNITE-15076
> URL: https://issues.apache.org/jira/browse/IGNITE-15076
> Project: Ignite
>  Issue Type: Bug
>  Components: sql
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Major
>  Labels: calcite, calcite3-required
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Found that node runner script failed with trace:
> {noformat}
> java.lang.ExceptionInInitializerError
> at 
> org.apache.calcite.tools.Frameworks$ConfigBuilder.(Frameworks.java:241)
> at 
> org.apache.calcite.tools.Frameworks$ConfigBuilder.(Frameworks.java:217)
> at 
> org.apache.calcite.tools.Frameworks.newConfigBuilder(Frameworks.java:201)
> at 
> org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.(CalciteQueryProcessor.java:73)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:264)
> at 
> org.apache.ignite.internal.util.IgniteUtils.inClassPath(IgniteUtils.java:1754)
> at 
> org.apache.ignite.internal.IgniteComponentType.inClassPath(IgniteComponentType.java:181)
> at 
> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:1267)
> at 
> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:2141)
> at 
> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1787)
> at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1172)
> at 
> org.apache.ignite.internal.IgnitionEx.startConfigurations(IgnitionEx.java:1066)
> at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:952)
> at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:851)
> at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:721)
> at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:690)
> at org.apache.ignite.Ignition.start(Ignition.java:353)
> at 
> org.apache.ignite.startup.cmdline.CommandLineStartup.main(CommandLineStartup.java:367)
> Caused by: java.lang.NullPointerException
> at 
> sun.reflect.annotation.TypeAnnotationParser.mapTypeAnnotations(TypeAnnotationParser.java:356)
> at 
> sun.reflect.annotation.AnnotatedTypeFactory$AnnotatedTypeBaseImpl.(AnnotatedTypeFactory.java:139)
> at 
> sun.reflect.annotation.AnnotatedTypeFactory.buildAnnotatedType(AnnotatedTypeFactory.java:65)
> at 
> sun.reflect.annotation.TypeAnnotationParser.buildAnnotatedType(TypeAnnotationParser.java:79)
> at 
> java.lang.reflect.Executable.getAnnotatedReturnType0(Executable.java:640)
> at java.lang.reflect.Method.getAnnotatedReturnType(Method.java:648)
> at 
> org.apache.calcite.util.ImmutableBeans.makeDef(ImmutableBeans.java:146)
> at 
> org.apache.calcite.util.ImmutableBeans.access$000(ImmutableBeans.java:55)
> at 
> org.apache.calcite.util.ImmutableBeans$1.load(ImmutableBeans.java:68)
> at 
> org.apache.calcite.util.ImmutableBeans$1.load(ImmutableBeans.java:65)
> at 
> com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)
> at 
> com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2276)
> at 
> com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2154)
> at 
> com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2044)
> at com.google.common.cache.LocalCache.get(LocalCache.java:3951)
> at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3973)
> at 
> com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4957)
> at 
> org.apache.calcite.util.ImmutableBeans.create_(ImmutableBeans.java:95)
> at 
> org.apache.calcite.util.ImmutableBeans.create(ImmutableBeans.java:76)
> at 
> org.apache.calcite.sql.validate.SqlValidator$Config.(SqlValidator.java:792)
> ... 19 more
> {noformat}



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


[jira] [Assigned] (IGNITE-12747) Calcite integration. Correlated queries support.

2021-07-13 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny reassigned IGNITE-12747:
---

Assignee: (was: Stanilovsky Evgeny)

> Calcite integration. Correlated queries support.
> 
>
> Key: IGNITE-12747
> URL: https://issues.apache.org/jira/browse/IGNITE-12747
> Project: Ignite
>  Issue Type: New Feature
>Reporter: Igor Seliverstov
>Priority: Critical
>  Labels: calcite2-required, calcite3-required
>  Time Spent: 4h 10m
>  Remaining Estimate: 0h
>
> Rewrite correlated subqueries.
> Useful links:
> [https://zhuanlan.zhihu.com/p/60380557]
> [https://zhuanlan.zhihu.com/p/62338250]
> [https://zhuanlan.zhihu.com/p/66227661]
>  



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


[jira] [Commented] (IGNITE-12747) Calcite integration. Correlated queries support.

2021-07-13 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-12747:
-

some correlate functionality merged in scope of [1], this issue seems need 
additional tests to be added.

[1] https://issues.apache.org/jira/browse/IGNITE-13159

 

> Calcite integration. Correlated queries support.
> 
>
> Key: IGNITE-12747
> URL: https://issues.apache.org/jira/browse/IGNITE-12747
> Project: Ignite
>  Issue Type: New Feature
>Reporter: Igor Seliverstov
>Assignee: Stanilovsky Evgeny
>Priority: Critical
>  Labels: calcite2-required, calcite3-required
>  Time Spent: 4h 10m
>  Remaining Estimate: 0h
>
> Rewrite correlated subqueries.
> Useful links:
> [https://zhuanlan.zhihu.com/p/60380557]
> [https://zhuanlan.zhihu.com/p/62338250]
> [https://zhuanlan.zhihu.com/p/66227661]
>  



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


[jira] [Commented] (IGNITE-13159) Calcite integration. Decorrelator support SOME and ALL operator.

2021-07-13 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-13159:
-

[~tledkov-gridgain] can u merge it plz ? thanks !

> Calcite integration. Decorrelator support SOME and ALL operator.
> 
>
> Key: IGNITE-13159
> URL: https://issues.apache.org/jira/browse/IGNITE-13159
> Project: Ignite
>  Issue Type: Bug
>Reporter: Andrey Mashenkov
>Assignee: Stanilovsky Evgeny
>Priority: Minor
>  Labels: calcite2-required, calcite3-required
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Now Calcite SqlToRelConverter throws an exception if found a subquery in 
> ALL\SOME operator. See SubqueryRewriteRuleTest.testNonAllToSemiAntiJoinRule 
> test and find stack trace below.
> We have to either set flag "expand=false" and implement LogicalCorrelate 
> converter
>  or some rules to overcome the issue.
> However, setting flag "expand=false" makes query pass, but with wrong join 
> type (left and inner instead of anti) and moreover it brakes other queries 
> due to weird decorrelator behavior. Possibly there is bug in Calcite. 
> {code:java}
> Caused by: java.lang.RuntimeException: ALL is only supported if expand = 
> falseCaused by: java.lang.RuntimeException: ALL is only supported if expand = 
> false at 
> org.apache.calcite.sql2rel.SqlToRelConverter$Blackboard.convertExpression(SqlToRelConverter.java:4814)
>  at 
> org.apache.calcite.sql2rel.SqlToRelConverter.convertWhere(SqlToRelConverter.java:1016)
>  at 
> org.apache.calcite.sql2rel.SqlToRelConverter.convertSelectImpl(SqlToRelConverter.java:662)
>  at 
> org.apache.calcite.sql2rel.SqlToRelConverter.convertSelect(SqlToRelConverter.java:640)
>  at 
> org.apache.calcite.sql2rel.SqlToRelConverter.convertQueryRecursive(SqlToRelConverter.java:3384)
>  at 
> org.apache.calcite.sql2rel.SqlToRelConverter.convertQuery(SqlToRelConverter.java:566)
>  at 
> org.apache.ignite.internal.processors.query.calcite.prepare.IgnitePlanner.rel(IgnitePlanner.java:203)
>  at 
> org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.optimize(ExecutionServiceImpl.java:618)
>  at 
> org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.prepareExplain(ExecutionServiceImpl.java:644)
>  at 
> org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.prepareSingle(ExecutionServiceImpl.java:573)
>  at 
> org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.prepare0(ExecutionServiceImpl.java:531)
>  ... 16 more
> {code}
>  
>  



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


[jira] [Assigned] (IGNITE-13159) Calcite integration. Decorrelator support SOME and ALL operator.

2021-07-13 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny reassigned IGNITE-13159:
---

Assignee: Stanilovsky Evgeny

> Calcite integration. Decorrelator support SOME and ALL operator.
> 
>
> Key: IGNITE-13159
> URL: https://issues.apache.org/jira/browse/IGNITE-13159
> Project: Ignite
>  Issue Type: Bug
>Reporter: Andrey Mashenkov
>Assignee: Stanilovsky Evgeny
>Priority: Minor
>  Labels: calcite2-required, calcite3-required
>
> Now Calcite SqlToRelConverter throws an exception if found a subquery in 
> ALL\SOME operator. See SubqueryRewriteRuleTest.testNonAllToSemiAntiJoinRule 
> test and find stack trace below.
> We have to either set flag "expand=false" and implement LogicalCorrelate 
> converter
>  or some rules to overcome the issue.
> However, setting flag "expand=false" makes query pass, but with wrong join 
> type (left and inner instead of anti) and moreover it brakes other queries 
> due to weird decorrelator behavior. Possibly there is bug in Calcite. 
> {code:java}
> Caused by: java.lang.RuntimeException: ALL is only supported if expand = 
> falseCaused by: java.lang.RuntimeException: ALL is only supported if expand = 
> false at 
> org.apache.calcite.sql2rel.SqlToRelConverter$Blackboard.convertExpression(SqlToRelConverter.java:4814)
>  at 
> org.apache.calcite.sql2rel.SqlToRelConverter.convertWhere(SqlToRelConverter.java:1016)
>  at 
> org.apache.calcite.sql2rel.SqlToRelConverter.convertSelectImpl(SqlToRelConverter.java:662)
>  at 
> org.apache.calcite.sql2rel.SqlToRelConverter.convertSelect(SqlToRelConverter.java:640)
>  at 
> org.apache.calcite.sql2rel.SqlToRelConverter.convertQueryRecursive(SqlToRelConverter.java:3384)
>  at 
> org.apache.calcite.sql2rel.SqlToRelConverter.convertQuery(SqlToRelConverter.java:566)
>  at 
> org.apache.ignite.internal.processors.query.calcite.prepare.IgnitePlanner.rel(IgnitePlanner.java:203)
>  at 
> org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.optimize(ExecutionServiceImpl.java:618)
>  at 
> org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.prepareExplain(ExecutionServiceImpl.java:644)
>  at 
> org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.prepareSingle(ExecutionServiceImpl.java:573)
>  at 
> org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.prepare0(ExecutionServiceImpl.java:531)
>  ... 16 more
> {code}
>  
>  



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


[jira] [Commented] (IGNITE-14857) Calcite integration. ALTER TABLE support

2021-07-08 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-14857:
-

[~alex_pl] i append some comments, plz check, overall looks good.

> Calcite integration. ALTER TABLE support
> 
>
> Key: IGNITE-14857
> URL: https://issues.apache.org/jira/browse/IGNITE-14857
> Project: Ignite
>  Issue Type: New Feature
>  Components: sql
>Reporter: Yury Gerzhedovich
>Assignee: Aleksey Plekhanov
>Priority: Major
>  Labels: calcite2-required, calcite3-required
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> We need to support DDL commands. The task about the support of ALTER TABLE  
> ADD/DROP/ALTER COLUMN.



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


[jira] [Updated] (IGNITE-15076) Calcite. ignite.[sh|bat] node runner script failed to start instance.

2021-07-08 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny updated IGNITE-15076:

Labels: calcite calcite2-required calcite3-required  (was: calcite 
calcite3-required)

> Calcite. ignite.[sh|bat] node runner script failed to start instance.
> -
>
> Key: IGNITE-15076
> URL: https://issues.apache.org/jira/browse/IGNITE-15076
> Project: Ignite
>  Issue Type: Bug
>  Components: sql
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Major
>  Labels: calcite, calcite2-required, calcite3-required
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Found that node runner script failed with trace:
> {noformat}
> java.lang.ExceptionInInitializerError
> at 
> org.apache.calcite.tools.Frameworks$ConfigBuilder.(Frameworks.java:241)
> at 
> org.apache.calcite.tools.Frameworks$ConfigBuilder.(Frameworks.java:217)
> at 
> org.apache.calcite.tools.Frameworks.newConfigBuilder(Frameworks.java:201)
> at 
> org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.(CalciteQueryProcessor.java:73)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:264)
> at 
> org.apache.ignite.internal.util.IgniteUtils.inClassPath(IgniteUtils.java:1754)
> at 
> org.apache.ignite.internal.IgniteComponentType.inClassPath(IgniteComponentType.java:181)
> at 
> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:1267)
> at 
> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:2141)
> at 
> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1787)
> at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1172)
> at 
> org.apache.ignite.internal.IgnitionEx.startConfigurations(IgnitionEx.java:1066)
> at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:952)
> at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:851)
> at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:721)
> at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:690)
> at org.apache.ignite.Ignition.start(Ignition.java:353)
> at 
> org.apache.ignite.startup.cmdline.CommandLineStartup.main(CommandLineStartup.java:367)
> Caused by: java.lang.NullPointerException
> at 
> sun.reflect.annotation.TypeAnnotationParser.mapTypeAnnotations(TypeAnnotationParser.java:356)
> at 
> sun.reflect.annotation.AnnotatedTypeFactory$AnnotatedTypeBaseImpl.(AnnotatedTypeFactory.java:139)
> at 
> sun.reflect.annotation.AnnotatedTypeFactory.buildAnnotatedType(AnnotatedTypeFactory.java:65)
> at 
> sun.reflect.annotation.TypeAnnotationParser.buildAnnotatedType(TypeAnnotationParser.java:79)
> at 
> java.lang.reflect.Executable.getAnnotatedReturnType0(Executable.java:640)
> at java.lang.reflect.Method.getAnnotatedReturnType(Method.java:648)
> at 
> org.apache.calcite.util.ImmutableBeans.makeDef(ImmutableBeans.java:146)
> at 
> org.apache.calcite.util.ImmutableBeans.access$000(ImmutableBeans.java:55)
> at 
> org.apache.calcite.util.ImmutableBeans$1.load(ImmutableBeans.java:68)
> at 
> org.apache.calcite.util.ImmutableBeans$1.load(ImmutableBeans.java:65)
> at 
> com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)
> at 
> com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2276)
> at 
> com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2154)
> at 
> com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2044)
> at com.google.common.cache.LocalCache.get(LocalCache.java:3951)
> at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3973)
> at 
> com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4957)
> at 
> org.apache.calcite.util.ImmutableBeans.create_(ImmutableBeans.java:95)
> at 
> org.apache.calcite.util.ImmutableBeans.create(ImmutableBeans.java:76)
> at 
> org.apache.calcite.sql.validate.SqlValidator$Config.(SqlValidator.java:792)
> ... 19 more
> {noformat}



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


[jira] [Reopened] (IGNITE-15076) Calcite. ignite.[sh|bat] node runner script failed to start instance.

2021-07-08 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny reopened IGNITE-15076:
-

> Calcite. ignite.[sh|bat] node runner script failed to start instance.
> -
>
> Key: IGNITE-15076
> URL: https://issues.apache.org/jira/browse/IGNITE-15076
> Project: Ignite
>  Issue Type: Bug
>  Components: sql
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Major
>  Labels: calcite, calcite2-required, calcite3-required
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Found that node runner script failed with trace:
> {noformat}
> java.lang.ExceptionInInitializerError
> at 
> org.apache.calcite.tools.Frameworks$ConfigBuilder.(Frameworks.java:241)
> at 
> org.apache.calcite.tools.Frameworks$ConfigBuilder.(Frameworks.java:217)
> at 
> org.apache.calcite.tools.Frameworks.newConfigBuilder(Frameworks.java:201)
> at 
> org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.(CalciteQueryProcessor.java:73)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:264)
> at 
> org.apache.ignite.internal.util.IgniteUtils.inClassPath(IgniteUtils.java:1754)
> at 
> org.apache.ignite.internal.IgniteComponentType.inClassPath(IgniteComponentType.java:181)
> at 
> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:1267)
> at 
> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:2141)
> at 
> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1787)
> at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1172)
> at 
> org.apache.ignite.internal.IgnitionEx.startConfigurations(IgnitionEx.java:1066)
> at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:952)
> at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:851)
> at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:721)
> at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:690)
> at org.apache.ignite.Ignition.start(Ignition.java:353)
> at 
> org.apache.ignite.startup.cmdline.CommandLineStartup.main(CommandLineStartup.java:367)
> Caused by: java.lang.NullPointerException
> at 
> sun.reflect.annotation.TypeAnnotationParser.mapTypeAnnotations(TypeAnnotationParser.java:356)
> at 
> sun.reflect.annotation.AnnotatedTypeFactory$AnnotatedTypeBaseImpl.(AnnotatedTypeFactory.java:139)
> at 
> sun.reflect.annotation.AnnotatedTypeFactory.buildAnnotatedType(AnnotatedTypeFactory.java:65)
> at 
> sun.reflect.annotation.TypeAnnotationParser.buildAnnotatedType(TypeAnnotationParser.java:79)
> at 
> java.lang.reflect.Executable.getAnnotatedReturnType0(Executable.java:640)
> at java.lang.reflect.Method.getAnnotatedReturnType(Method.java:648)
> at 
> org.apache.calcite.util.ImmutableBeans.makeDef(ImmutableBeans.java:146)
> at 
> org.apache.calcite.util.ImmutableBeans.access$000(ImmutableBeans.java:55)
> at 
> org.apache.calcite.util.ImmutableBeans$1.load(ImmutableBeans.java:68)
> at 
> org.apache.calcite.util.ImmutableBeans$1.load(ImmutableBeans.java:65)
> at 
> com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)
> at 
> com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2276)
> at 
> com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2154)
> at 
> com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2044)
> at com.google.common.cache.LocalCache.get(LocalCache.java:3951)
> at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3973)
> at 
> com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4957)
> at 
> org.apache.calcite.util.ImmutableBeans.create_(ImmutableBeans.java:95)
> at 
> org.apache.calcite.util.ImmutableBeans.create(ImmutableBeans.java:76)
> at 
> org.apache.calcite.sql.validate.SqlValidator$Config.(SqlValidator.java:792)
> ... 19 more
> {noformat}



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


[jira] [Commented] (IGNITE-12747) Calcite integration. Correlated queries support.

2021-07-08 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-12747:
-

https://issues.apache.org/jira/browse/IGNITE-14537 need to be closed after 
merging.

> Calcite integration. Correlated queries support.
> 
>
> Key: IGNITE-12747
> URL: https://issues.apache.org/jira/browse/IGNITE-12747
> Project: Ignite
>  Issue Type: New Feature
>Reporter: Igor Seliverstov
>Assignee: Stanilovsky Evgeny
>Priority: Critical
>  Labels: calcite2-required, calcite3-required
>  Time Spent: 4h
>  Remaining Estimate: 0h
>
> Rewrite correlated subqueries.
> Useful links:
> [https://zhuanlan.zhihu.com/p/60380557]
> [https://zhuanlan.zhihu.com/p/62338250]
> [https://zhuanlan.zhihu.com/p/66227661]
>  



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


[jira] [Updated] (IGNITE-15076) Calcite. ignite.[sh|bat] node runner script failed to start instance.

2021-07-07 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny updated IGNITE-15076:

Labels: calcite calcite2-required calcite3-required  (was: calcite)

> Calcite. ignite.[sh|bat] node runner script failed to start instance.
> -
>
> Key: IGNITE-15076
> URL: https://issues.apache.org/jira/browse/IGNITE-15076
> Project: Ignite
>  Issue Type: Bug
>  Components: sql
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Major
>  Labels: calcite, calcite2-required, calcite3-required
>
> Found that node runner script failed with trace:
> {noformat}
> java.lang.ExceptionInInitializerError
> at 
> org.apache.calcite.tools.Frameworks$ConfigBuilder.(Frameworks.java:241)
> at 
> org.apache.calcite.tools.Frameworks$ConfigBuilder.(Frameworks.java:217)
> at 
> org.apache.calcite.tools.Frameworks.newConfigBuilder(Frameworks.java:201)
> at 
> org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.(CalciteQueryProcessor.java:73)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:264)
> at 
> org.apache.ignite.internal.util.IgniteUtils.inClassPath(IgniteUtils.java:1754)
> at 
> org.apache.ignite.internal.IgniteComponentType.inClassPath(IgniteComponentType.java:181)
> at 
> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:1267)
> at 
> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:2141)
> at 
> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1787)
> at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1172)
> at 
> org.apache.ignite.internal.IgnitionEx.startConfigurations(IgnitionEx.java:1066)
> at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:952)
> at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:851)
> at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:721)
> at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:690)
> at org.apache.ignite.Ignition.start(Ignition.java:353)
> at 
> org.apache.ignite.startup.cmdline.CommandLineStartup.main(CommandLineStartup.java:367)
> Caused by: java.lang.NullPointerException
> at 
> sun.reflect.annotation.TypeAnnotationParser.mapTypeAnnotations(TypeAnnotationParser.java:356)
> at 
> sun.reflect.annotation.AnnotatedTypeFactory$AnnotatedTypeBaseImpl.(AnnotatedTypeFactory.java:139)
> at 
> sun.reflect.annotation.AnnotatedTypeFactory.buildAnnotatedType(AnnotatedTypeFactory.java:65)
> at 
> sun.reflect.annotation.TypeAnnotationParser.buildAnnotatedType(TypeAnnotationParser.java:79)
> at 
> java.lang.reflect.Executable.getAnnotatedReturnType0(Executable.java:640)
> at java.lang.reflect.Method.getAnnotatedReturnType(Method.java:648)
> at 
> org.apache.calcite.util.ImmutableBeans.makeDef(ImmutableBeans.java:146)
> at 
> org.apache.calcite.util.ImmutableBeans.access$000(ImmutableBeans.java:55)
> at 
> org.apache.calcite.util.ImmutableBeans$1.load(ImmutableBeans.java:68)
> at 
> org.apache.calcite.util.ImmutableBeans$1.load(ImmutableBeans.java:65)
> at 
> com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)
> at 
> com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2276)
> at 
> com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2154)
> at 
> com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2044)
> at com.google.common.cache.LocalCache.get(LocalCache.java:3951)
> at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3973)
> at 
> com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4957)
> at 
> org.apache.calcite.util.ImmutableBeans.create_(ImmutableBeans.java:95)
> at 
> org.apache.calcite.util.ImmutableBeans.create(ImmutableBeans.java:76)
> at 
> org.apache.calcite.sql.validate.SqlValidator$Config.(SqlValidator.java:792)
> ... 19 more
> {noformat}



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


[jira] [Created] (IGNITE-15076) Calcite. ignite.[sh|bat] node runner script failed to start instance.

2021-07-07 Thread Stanilovsky Evgeny (Jira)
Stanilovsky Evgeny created IGNITE-15076:
---

 Summary: Calcite. ignite.[sh|bat] node runner script failed to 
start instance.
 Key: IGNITE-15076
 URL: https://issues.apache.org/jira/browse/IGNITE-15076
 Project: Ignite
  Issue Type: Bug
  Components: sql
Reporter: Stanilovsky Evgeny
Assignee: Stanilovsky Evgeny


Found that node runner script failed with trace:

{noformat}
java.lang.ExceptionInInitializerError
at 
org.apache.calcite.tools.Frameworks$ConfigBuilder.(Frameworks.java:241)
at 
org.apache.calcite.tools.Frameworks$ConfigBuilder.(Frameworks.java:217)
at 
org.apache.calcite.tools.Frameworks.newConfigBuilder(Frameworks.java:201)
at 
org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.(CalciteQueryProcessor.java:73)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at 
org.apache.ignite.internal.util.IgniteUtils.inClassPath(IgniteUtils.java:1754)
at 
org.apache.ignite.internal.IgniteComponentType.inClassPath(IgniteComponentType.java:181)
at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:1267)
at 
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:2141)
at 
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1787)
at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1172)
at 
org.apache.ignite.internal.IgnitionEx.startConfigurations(IgnitionEx.java:1066)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:952)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:851)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:721)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:690)
at org.apache.ignite.Ignition.start(Ignition.java:353)
at 
org.apache.ignite.startup.cmdline.CommandLineStartup.main(CommandLineStartup.java:367)
Caused by: java.lang.NullPointerException
at 
sun.reflect.annotation.TypeAnnotationParser.mapTypeAnnotations(TypeAnnotationParser.java:356)
at 
sun.reflect.annotation.AnnotatedTypeFactory$AnnotatedTypeBaseImpl.(AnnotatedTypeFactory.java:139)
at 
sun.reflect.annotation.AnnotatedTypeFactory.buildAnnotatedType(AnnotatedTypeFactory.java:65)
at 
sun.reflect.annotation.TypeAnnotationParser.buildAnnotatedType(TypeAnnotationParser.java:79)
at 
java.lang.reflect.Executable.getAnnotatedReturnType0(Executable.java:640)
at java.lang.reflect.Method.getAnnotatedReturnType(Method.java:648)
at 
org.apache.calcite.util.ImmutableBeans.makeDef(ImmutableBeans.java:146)
at 
org.apache.calcite.util.ImmutableBeans.access$000(ImmutableBeans.java:55)
at org.apache.calcite.util.ImmutableBeans$1.load(ImmutableBeans.java:68)
at org.apache.calcite.util.ImmutableBeans$1.load(ImmutableBeans.java:65)
at 
com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)
at 
com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2276)
at 
com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2154)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2044)
at com.google.common.cache.LocalCache.get(LocalCache.java:3951)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3973)
at 
com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4957)
at 
org.apache.calcite.util.ImmutableBeans.create_(ImmutableBeans.java:95)
at org.apache.calcite.util.ImmutableBeans.create(ImmutableBeans.java:76)
at 
org.apache.calcite.sql.validate.SqlValidator$Config.(SqlValidator.java:792)
... 19 more
{noformat}




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


[jira] [Commented] (IGNITE-13810) Append additional log and metrics info regarding cache expiration.

2021-07-07 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-13810:
-

[~ksirotkin] do you have any progress here ?

> Append additional log and metrics info regarding cache expiration. 
> ---
>
> Key: IGNITE-13810
> URL: https://issues.apache.org/jira/browse/IGNITE-13810
> Project: Ignite
>  Issue Type: Improvement
>  Components: cache
>Affects Versions: 2.9
>Reporter: Stanilovsky Evgeny
>Assignee: Konstantin Sirotkin
>Priority: Major
>  Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> Currently we have no any additional information regarding  
> _cache.withExpiryPolicy_ execution. Additionally it would be very useful to 
> have a corresponding metric.



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


[jira] [Updated] (IGNITE-14903) Calcite. Bump calcite version up to 1.27.0.

2021-07-06 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny updated IGNITE-14903:

Labels: calcite calcite3-required  (was: calcite calcite2-required 
calcite3-required)

> Calcite. Bump calcite version up to 1.27.0.
> ---
>
> Key: IGNITE-14903
> URL: https://issues.apache.org/jira/browse/IGNITE-14903
> Project: Ignite
>  Issue Type: Improvement
>  Components: sql
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Major
>  Labels: calcite, calcite3-required
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Update calcite ver up to 1.27.0.



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


[jira] [Commented] (IGNITE-15008) ignite.reentrantLock deadlock at thread shutdown

2021-06-29 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-15008:
-

hi, plz append thread dumps ?

> ignite.reentrantLock deadlock at thread shutdown
> 
>
> Key: IGNITE-15008
> URL: https://issues.apache.org/jira/browse/IGNITE-15008
> Project: Ignite
>  Issue Type: Bug
>  Components: cache
>Affects Versions: 2.10, 2.9.1
>Reporter: icode
>Priority: Blocker
>
> I use `ignite.reentrantLock(lockName, true, true, true)` for single work, but 
> it deadlock at ExecutorService *shutdownNow*, `unlock` api will throw error 
> say this thead is interrupted, and can not close this lock.
> Please remove interrupted thread check or unlock it at interrupt this thread.
> Thanks.



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


[jira] [Created] (IGNITE-14929) Flacky test IgniteWalHistoryReservationsTest#testWalHistoryPartiallyRemoved.

2021-06-17 Thread Stanilovsky Evgeny (Jira)
Stanilovsky Evgeny created IGNITE-14929:
---

 Summary: Flacky test 
IgniteWalHistoryReservationsTest#testWalHistoryPartiallyRemoved.
 Key: IGNITE-14929
 URL: https://issues.apache.org/jira/browse/IGNITE-14929
 Project: Ignite
  Issue Type: Improvement
  Components: persistence
Affects Versions: 2.10
Reporter: Stanilovsky Evgeny
Assignee: Stanilovsky Evgeny


We will need to finish checkpoint before node stops and only after it - clean 
archive directory.



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


[jira] [Commented] (IGNITE-14702) Inconsistency of the new index when the node falls / deactivates

2021-06-17 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-14702:
-

[~ktkale...@gridgain.com] i left some comments, overall looks good.

> Inconsistency of the new index when the node falls / deactivates
> 
>
> Key: IGNITE-14702
> URL: https://issues.apache.org/jira/browse/IGNITE-14702
> Project: Ignite
>  Issue Type: Bug
>  Components: persistence, sql
>Reporter: Kirill Tkalenko
>Assignee: Kirill Tkalenko
>Priority: Major
> Fix For: 2.12
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> At the moment, if we add a new index and in the middle of its construction we 
> fall / deactivate a node, then it will be inconsistent and may create errors.
> Need to either add a new index to DurableBackgroundTask, or add / modify a 
> separate mechanism that allows to resume the creation of a new index.



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


[jira] [Commented] (IGNITE-13549) Calcite integration. CREATE/DROP INDEX support

2021-06-17 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-13549:
-

looks good.

> Calcite integration. CREATE/DROP INDEX support
> --
>
> Key: IGNITE-13549
> URL: https://issues.apache.org/jira/browse/IGNITE-13549
> Project: Ignite
>  Issue Type: New Feature
>  Components: sql
>Reporter: Yury Gerzhedovich
>Assignee: Aleksey Plekhanov
>Priority: Critical
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> We need to support DDL commands. The task about the support of CREATE/DROP 
> INDEX. Potentially with syntaxis as we already have in the H2 engine.



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


[jira] [Commented] (IGNITE-14849) Calcite engine. Support '%' operator as alias for 'mod' function

2021-06-16 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-14849:
-

looks good !

> Calcite engine. Support '%' operator as alias for 'mod' function
> 
>
> Key: IGNITE-14849
> URL: https://issues.apache.org/jira/browse/IGNITE-14849
> Project: Ignite
>  Issue Type: Improvement
>Reporter: Aleksey Plekhanov
>Assignee: Aleksey Plekhanov
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Currently, the H2-based SQL engine supports both {{a % b}} and {{mod(a, b)}} 
> syntax for the modulo operation. But calcite-based engine supports only 
> {{mod(a, b)}} syntax. Support for {{%}} operator should be added to minimize 
> compatibility issues. 
> Affected tests:
> {{src/test/sql/aggregate/group/test_group_by.test}}
> And many other.



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


[jira] [Assigned] (IGNITE-14916) Calcite. FilterSpoolMergeToHashIndexSpoolRule need to be applicable only if all conditions are covered.

2021-06-16 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny reassigned IGNITE-14916:
---

Assignee: Taras Ledkov  (was: Stanilovsky Evgeny)

> Calcite. FilterSpoolMergeToHashIndexSpoolRule need to be applicable only if 
> all conditions are covered.
> ---
>
> Key: IGNITE-14916
> URL: https://issues.apache.org/jira/browse/IGNITE-14916
> Project: Ignite
>  Issue Type: Improvement
>  Components: sql
>Reporter: Stanilovsky Evgeny
>Assignee: Taras Ledkov
>Priority: Major
>  Labels: calcite
>
> FilterSpoolMergeToHashIndexSpoolRule can return erroneous results cause it 
> takes into account only _searchRow_ which can be partial representation of 
> _condition_.



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


[jira] [Assigned] (IGNITE-14916) Calcite. FilterSpoolMergeToHashIndexSpoolRule need to be applicable only if all conditions are covered.

2021-06-16 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny reassigned IGNITE-14916:
---

Assignee: Stanilovsky Evgeny

> Calcite. FilterSpoolMergeToHashIndexSpoolRule need to be applicable only if 
> all conditions are covered.
> ---
>
> Key: IGNITE-14916
> URL: https://issues.apache.org/jira/browse/IGNITE-14916
> Project: Ignite
>  Issue Type: Improvement
>  Components: sql
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Major
>  Labels: calcite
>
> FilterSpoolMergeToHashIndexSpoolRule can return erroneous results cause it 
> takes into account only _searchRow_ which can be partial representation of 
> _condition_.



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


[jira] [Created] (IGNITE-14916) Calcite. FilterSpoolMergeToHashIndexSpoolRule need to be applicable only if all conditions are covered.

2021-06-16 Thread Stanilovsky Evgeny (Jira)
Stanilovsky Evgeny created IGNITE-14916:
---

 Summary: Calcite. FilterSpoolMergeToHashIndexSpoolRule need to be 
applicable only if all conditions are covered.
 Key: IGNITE-14916
 URL: https://issues.apache.org/jira/browse/IGNITE-14916
 Project: Ignite
  Issue Type: Improvement
  Components: sql
Reporter: Stanilovsky Evgeny


FilterSpoolMergeToHashIndexSpoolRule can return erroneous results cause it 
takes into account only _searchRow_ which can be partial representation of 
_condition_.



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


[jira] [Updated] (IGNITE-14903) Calcite. Bump calcite version up to 1.27.0.

2021-06-15 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny updated IGNITE-14903:

Description: Update calcite ver up to 1.27.0.

> Calcite. Bump calcite version up to 1.27.0.
> ---
>
> Key: IGNITE-14903
> URL: https://issues.apache.org/jira/browse/IGNITE-14903
> Project: Ignite
>  Issue Type: Improvement
>  Components: sql
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Major
>  Labels: calcite
>
> Update calcite ver up to 1.27.0.



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


[jira] [Created] (IGNITE-14903) Calcite. Bump calcite version up to 1.27.0.

2021-06-15 Thread Stanilovsky Evgeny (Jira)
Stanilovsky Evgeny created IGNITE-14903:
---

 Summary: Calcite. Bump calcite version up to 1.27.0.
 Key: IGNITE-14903
 URL: https://issues.apache.org/jira/browse/IGNITE-14903
 Project: Ignite
  Issue Type: Improvement
  Components: sql
Reporter: Stanilovsky Evgeny
Assignee: Stanilovsky Evgeny






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


[jira] [Commented] (IGNITE-13587) Calcite improvements. Append tests for unstable topology checking.

2021-06-11 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-13587:
-

[~korlov] [~tledkov-gridgain] i think this test is still actual, wdyt ? 

> Calcite improvements. Append tests for unstable topology checking.
> --
>
> Key: IGNITE-13587
> URL: https://issues.apache.org/jira/browse/IGNITE-13587
> Project: Ignite
>  Issue Type: Test
>  Components: sql
>Affects Versions: 2.8.1
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Major
>  Labels: calcite
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> After [1] was found in h2 realization we probably need for such kind of tests 
> with calcite.
> [1] https://issues.apache.org/jira/browse/IGNITE-13572 (Duplicates in select 
> query during partition eviction.)



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


[jira] [Commented] (IGNITE-14808) Calcite. RIGHT|FULL Join operations are lost nulls sort ordering.

2021-06-11 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-14808:
-

[~tledkov-gridgain] check it plz ?

> Calcite. RIGHT|FULL Join operations are lost nulls sort ordering.
> -
>
> Key: IGNITE-14808
> URL: https://issues.apache.org/jira/browse/IGNITE-14808
> Project: Ignite
>  Issue Type: Bug
>  Components: sql
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Major
>  Labels: calcite
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> queries like 
> {noformat}
> FROM integers FULL OUTER JOIN integers2 ON integers.i=integers2.k ORDER BY i 
> NULLS FIRST
> {noformat} will bring to erroneous results. Also some tests from /sql/join* 
> have no ordering thus results are not equal to pattern.



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


[jira] [Commented] (IGNITE-13744) Calcite. Use TableSpool for IgniteNestedLoopJoin

2021-06-11 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-13744:
-

[~korlov] [~tledkov-gridgain] ready for review.

> Calcite. Use TableSpool for IgniteNestedLoopJoin
> 
>
> Key: IGNITE-13744
> URL: https://issues.apache.org/jira/browse/IGNITE-13744
> Project: Ignite
>  Issue Type: Bug
>  Components: sql
>Reporter: Taras Ledkov
>Assignee: Stanilovsky Evgeny
>Priority: Minor
>  Labels: calcite
>
> Now {{NestedLoopJoinNode}} uses internal buffer to save all rows of the right 
> input.
> We have to do refactoring {{IgniteNestedLoopJoin}} to use rewind of the right 
> input and use TableSpool for not rewindable inputs.
> This refactoring separates implementation the join logic from materialization 
> of the right input if it is needed. In the future we can use disk offload for 
> TableSpool etc.



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


[jira] [Updated] (IGNITE-13744) Calcite. Use TableSpool for IgniteNestedLoopJoin

2021-06-11 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny updated IGNITE-13744:

Ignite Flags:   (was: Docs Required,Release Notes Required)
  Labels: calcite  (was: )

> Calcite. Use TableSpool for IgniteNestedLoopJoin
> 
>
> Key: IGNITE-13744
> URL: https://issues.apache.org/jira/browse/IGNITE-13744
> Project: Ignite
>  Issue Type: Bug
>  Components: sql
>Reporter: Taras Ledkov
>Assignee: Stanilovsky Evgeny
>Priority: Minor
>  Labels: calcite
>
> Now {{NestedLoopJoinNode}} uses internal buffer to save all rows of the right 
> input.
> We have to do refactoring {{IgniteNestedLoopJoin}} to use rewind of the right 
> input and use TableSpool for not rewindable inputs.
> This refactoring separates implementation the join logic from materialization 
> of the right input if it is needed. In the future we can use disk offload for 
> TableSpool etc.



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


[jira] [Updated] (IGNITE-13744) Calcite. Use TableSpool for IgniteNestedLoopJoin

2021-06-11 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny updated IGNITE-13744:

Summary: Calcite. Use TableSpool for IgniteNestedLoopJoin  (was: Use 
TableSpool for IgniteNestedLoopJoin)

> Calcite. Use TableSpool for IgniteNestedLoopJoin
> 
>
> Key: IGNITE-13744
> URL: https://issues.apache.org/jira/browse/IGNITE-13744
> Project: Ignite
>  Issue Type: Bug
>  Components: sql
>Reporter: Taras Ledkov
>Assignee: Stanilovsky Evgeny
>Priority: Minor
>
> Now {{NestedLoopJoinNode}} uses internal buffer to save all rows of the right 
> input.
> We have to do refactoring {{IgniteNestedLoopJoin}} to use rewind of the right 
> input and use TableSpool for not rewindable inputs.
> This refactoring separates implementation the join logic from materialization 
> of the right input if it is needed. In the future we can use disk offload for 
> TableSpool etc.



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


[jira] [Assigned] (IGNITE-13744) Use TableSpool for IgniteNestedLoopJoin

2021-06-11 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny reassigned IGNITE-13744:
---

Assignee: Stanilovsky Evgeny  (was: Taras Ledkov)

> Use TableSpool for IgniteNestedLoopJoin
> ---
>
> Key: IGNITE-13744
> URL: https://issues.apache.org/jira/browse/IGNITE-13744
> Project: Ignite
>  Issue Type: Bug
>  Components: sql
>Reporter: Taras Ledkov
>Assignee: Stanilovsky Evgeny
>Priority: Minor
>
> Now {{NestedLoopJoinNode}} uses internal buffer to save all rows of the right 
> input.
> We have to do refactoring {{IgniteNestedLoopJoin}} to use rewind of the right 
> input and use TableSpool for not rewindable inputs.
> This refactoring separates implementation the join logic from materialization 
> of the right input if it is needed. In the future we can use disk offload for 
> TableSpool etc.



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


[jira] [Assigned] (IGNITE-12747) Calcite integration. Correlated queries support.

2021-06-07 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny reassigned IGNITE-12747:
---

Assignee: Stanilovsky Evgeny  (was: Andrey Mashenkov)

> Calcite integration. Correlated queries support.
> 
>
> Key: IGNITE-12747
> URL: https://issues.apache.org/jira/browse/IGNITE-12747
> Project: Ignite
>  Issue Type: New Feature
>Reporter: Igor Seliverstov
>Assignee: Stanilovsky Evgeny
>Priority: Critical
>  Time Spent: 3.5h
>  Remaining Estimate: 0h
>
> Rewrite correlated subqueries.
> Useful links:
> [https://zhuanlan.zhihu.com/p/60380557]
> [https://zhuanlan.zhihu.com/p/62338250]
> [https://zhuanlan.zhihu.com/p/66227661]
>  



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


[jira] [Commented] (IGNITE-12747) Calcite integration. Correlated queries support.

2021-06-02 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-12747:
-

[~alex_pl] thanks for review, partially fixed. [~tledkov-gridgain] are u have 
any additional comments too ?

> Calcite integration. Correlated queries support.
> 
>
> Key: IGNITE-12747
> URL: https://issues.apache.org/jira/browse/IGNITE-12747
> Project: Ignite
>  Issue Type: New Feature
>Reporter: Igor Seliverstov
>Assignee: Andrey Mashenkov
>Priority: Critical
>  Time Spent: 3h 10m
>  Remaining Estimate: 0h
>
> Rewrite correlated subqueries.
> Useful links:
> [https://zhuanlan.zhihu.com/p/60380557]
> [https://zhuanlan.zhihu.com/p/62338250]
> [https://zhuanlan.zhihu.com/p/66227661]
>  



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


[jira] [Commented] (IGNITE-14739) Enable a permanent wal recording of transactions states records.

2021-06-02 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-14739:
-

[~sergey-chugunov] i comment unrelevant test. Check it plz.

> Enable a permanent wal recording of transactions states records.
> 
>
> Key: IGNITE-14739
> URL: https://issues.apache.org/jira/browse/IGNITE-14739
> Project: Ignite
>  Issue Type: Improvement
>  Components: persistence
>Affects Versions: 2.10
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Major
> Attachments: screenshot-1.png
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> After [1] was merged, i suggest to enable transactions states wal logging on 
> a permanent basis. This will allow to correctly restore transactional states 
> after partial or whole nodes crash. 
> [1] https://issues.apache.org/jira/browse/IGNITE-6324



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


[jira] [Commented] (IGNITE-14808) Calcite. RIGHT|FULL Join operations are lost nulls sort ordering.

2021-06-01 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-14808:
-

[~korlov] take a look plz ?

> Calcite. RIGHT|FULL Join operations are lost nulls sort ordering.
> -
>
> Key: IGNITE-14808
> URL: https://issues.apache.org/jira/browse/IGNITE-14808
> Project: Ignite
>  Issue Type: Bug
>  Components: sql
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Major
>  Labels: calcite
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> queries like 
> {noformat}
> FROM integers FULL OUTER JOIN integers2 ON integers.i=integers2.k ORDER BY i 
> NULLS FIRST
> {noformat} will bring to erroneous results. Also some tests from /sql/join* 
> have no ordering thus results are not equal to pattern.



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


[jira] [Resolved] (IGNITE-14810) Calcite. Simple JOIN with f1=f2 cannot be planned with CNLJ.

2021-06-01 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny resolved IGNITE-14810.
-
Resolution: Not A Bug

> Calcite. Simple JOIN with f1=f2 cannot be planned with CNLJ.
> 
>
> Key: IGNITE-14810
> URL: https://issues.apache.org/jira/browse/IGNITE-14810
> Project: Ignite
>  Issue Type: Improvement
>  Components: sql
>Reporter: Stanilovsky Evgeny
>Priority: Major
>  Labels: calcite
>
> For now simple JOIN requests like:
> {noformat}
> SELECT * FROM integers FULL OUTER JOIN integers2 ON integers.i=integers2.k 
> ORDER BY i
> {noformat}
> can be planned only through MergeJoin or NestedLoopJoin it would be useful to 
> extend it with CNLJ too. Starting point : 
> {{FilterSpoolMergeToSortedIndexSpoolRule#onMatch}}
> We have to add new rule 
> {{FilterSpoolMergeToSortedIndexSpoolRule_ForceCollation}} which forces 
> collation by the filter condition. 



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


[jira] [Updated] (IGNITE-14810) Calcite. Simple JOIN with f1=f2 cannot be planned with CNLJ.

2021-06-01 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny updated IGNITE-14810:

Summary: Calcite. Simple JOIN with f1=f2 cannot be planned with CNLJ.  
(was: Calcite. SimpleJOIN with f1=f2 cannot be planned with CNLJ.)

> Calcite. Simple JOIN with f1=f2 cannot be planned with CNLJ.
> 
>
> Key: IGNITE-14810
> URL: https://issues.apache.org/jira/browse/IGNITE-14810
> Project: Ignite
>  Issue Type: Improvement
>  Components: sql
>Reporter: Stanilovsky Evgeny
>Priority: Major
>  Labels: calcite
>
> For now simple JOIN requests like:
> {noformat}
> SELECT * FROM integers FULL OUTER JOIN integers2 ON integers.i=integers2.k 
> ORDER BY i
> {noformat}
> can be planned only through MergeJoin or NestedLoopJoin it would be useful to 
> extend it with CNLJ too. Starting point : 
> FilterSpoolMergeToSortedIndexSpoolRule#onMatch



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


[jira] [Created] (IGNITE-14810) Calcite. SimpleJOIN with f1=f2 cannot be planned with CNLJ.

2021-06-01 Thread Stanilovsky Evgeny (Jira)
Stanilovsky Evgeny created IGNITE-14810:
---

 Summary: Calcite. SimpleJOIN with f1=f2 cannot be planned with 
CNLJ.
 Key: IGNITE-14810
 URL: https://issues.apache.org/jira/browse/IGNITE-14810
 Project: Ignite
  Issue Type: Improvement
  Components: sql
Reporter: Stanilovsky Evgeny


For now simple JOIN requests like:

{noformat}
SELECT * FROM integers FULL OUTER JOIN integers2 ON integers.i=integers2.k 
ORDER BY i
{noformat}

can be planned only through MergeJoin or NestedLoopJoin it would be useful to 
extend it with CNLJ too. Starting point : 
FilterSpoolMergeToSortedIndexSpoolRule#onMatch




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


[jira] [Created] (IGNITE-14808) Calcite. RIGHT|FULL Join operations are lost nulls sort ordering.

2021-06-01 Thread Stanilovsky Evgeny (Jira)
Stanilovsky Evgeny created IGNITE-14808:
---

 Summary: Calcite. RIGHT|FULL Join operations are lost nulls sort 
ordering.
 Key: IGNITE-14808
 URL: https://issues.apache.org/jira/browse/IGNITE-14808
 Project: Ignite
  Issue Type: Bug
  Components: sql
 Environment: queries like 
{noformat}
FROM integers FULL OUTER JOIN integers2 ON integers.i=integers2.k ORDER BY i 
NULLS FIRST
{noformat} will bring to erroneous results. Also some tests from /sql/join* 
have no ordering thus results are not equal to pattern.

Reporter: Stanilovsky Evgeny
Assignee: Stanilovsky Evgeny






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


[jira] [Updated] (IGNITE-14808) Calcite. RIGHT|FULL Join operations are lost nulls sort ordering.

2021-06-01 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny updated IGNITE-14808:

Description: 
queries like 
{noformat}
FROM integers FULL OUTER JOIN integers2 ON integers.i=integers2.k ORDER BY i 
NULLS FIRST
{noformat} will bring to erroneous results. Also some tests from /sql/join* 
have no ordering thus results are not equal to pattern.


> Calcite. RIGHT|FULL Join operations are lost nulls sort ordering.
> -
>
> Key: IGNITE-14808
> URL: https://issues.apache.org/jira/browse/IGNITE-14808
> Project: Ignite
>  Issue Type: Bug
>  Components: sql
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Major
>  Labels: calcite
>
> queries like 
> {noformat}
> FROM integers FULL OUTER JOIN integers2 ON integers.i=integers2.k ORDER BY i 
> NULLS FIRST
> {noformat} will bring to erroneous results. Also some tests from /sql/join* 
> have no ordering thus results are not equal to pattern.



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


[jira] [Updated] (IGNITE-14808) Calcite. RIGHT|FULL Join operations are lost nulls sort ordering.

2021-06-01 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny updated IGNITE-14808:

Environment: (was: queries like 
{noformat}
FROM integers FULL OUTER JOIN integers2 ON integers.i=integers2.k ORDER BY i 
NULLS FIRST
{noformat} will bring to erroneous results. Also some tests from /sql/join* 
have no ordering thus results are not equal to pattern.
)

> Calcite. RIGHT|FULL Join operations are lost nulls sort ordering.
> -
>
> Key: IGNITE-14808
> URL: https://issues.apache.org/jira/browse/IGNITE-14808
> Project: Ignite
>  Issue Type: Bug
>  Components: sql
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Major
>  Labels: calcite
>




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


[jira] [Resolved] (IGNITE-14489) Reduce wal operations if no update counters are changed.

2021-05-31 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny resolved IGNITE-14489.
-
Resolution: Not A Problem

> Reduce wal operations if no update counters are changed.
> 
>
> Key: IGNITE-14489
> URL: https://issues.apache.org/jira/browse/IGNITE-14489
> Project: Ignite
>  Issue Type: Improvement
>  Components: persistence
>Affects Versions: 2.10
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Major
>
> Reduce wal writes if update counters are not changed.



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


[jira] [Commented] (IGNITE-14778) Calcite integration. Expression executor

2021-05-28 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-14778:
-

[~korlov] the only one comment from my side, check it plz.

> Calcite integration. Expression executor
> 
>
> Key: IGNITE-14778
> URL: https://issues.apache.org/jira/browse/IGNITE-14778
> Project: Ignite
>  Issue Type: Task
>  Components: sql
>Reporter: Konstantin Orlov
>Assignee: Konstantin Orlov
>Priority: Major
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Implement a minimal expression executor



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


[jira] [Commented] (IGNITE-14779) Calcite. Unblock NULLS FIRST|LAST functionality checks calling from script runner tests.

2021-05-28 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-14779:
-

[~tledkov-gridgain]  can u help with merge? thanks !

> Calcite. Unblock NULLS FIRST|LAST functionality checks calling from script 
> runner tests.
> 
>
> Key: IGNITE-14779
> URL: https://issues.apache.org/jira/browse/IGNITE-14779
> Project: Ignite
>  Issue Type: Improvement
>  Components: sql
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Major
>  Labels: calcite
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> We have numerous tests under _order/test_nulls_first.test_ but they seems to 
> be failed due to *#pragma* specific parameters which are not take into 
> account while calcite tests are running.



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


[jira] [Commented] (IGNITE-12747) Calcite integration. Correlated queries support.

2021-05-27 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-12747:
-

[~korlov] thanks for comments, all done, check it plz ?

> Calcite integration. Correlated queries support.
> 
>
> Key: IGNITE-12747
> URL: https://issues.apache.org/jira/browse/IGNITE-12747
> Project: Ignite
>  Issue Type: New Feature
>Reporter: Igor Seliverstov
>Assignee: Andrey Mashenkov
>Priority: Critical
>  Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> Rewrite correlated subqueries.
> Useful links:
> [https://zhuanlan.zhihu.com/p/60380557]
> [https://zhuanlan.zhihu.com/p/62338250]
> [https://zhuanlan.zhihu.com/p/66227661]
>  



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


[jira] [Commented] (IGNITE-14739) Enable a permanent wal recording of transactions states records.

2021-05-26 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-14739:
-

[~ascherbakov] this drop is a payment for the correctness ) May be after your 
mention with incorrect logic it will reduce a bit. However i still suppose that 
this drop is negligible in comparison with fix that it contains. No one 
rejection on dev list found.

> Enable a permanent wal recording of transactions states records.
> 
>
> Key: IGNITE-14739
> URL: https://issues.apache.org/jira/browse/IGNITE-14739
> Project: Ignite
>  Issue Type: Improvement
>  Components: persistence
>Affects Versions: 2.10
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Major
> Attachments: screenshot-1.png
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> After [1] was merged, i suggest to enable transactions states wal logging on 
> a permanent basis. This will allow to correctly restore transactional states 
> after partial or whole nodes crash. 
> [1] https://issues.apache.org/jira/browse/IGNITE-6324



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


[jira] [Commented] (IGNITE-14779) Calcite. Unblock NULLS FIRST|LAST functionality checks calling from script runner tests.

2021-05-25 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-14779:
-

[~korlov] can u review it plz ?

> Calcite. Unblock NULLS FIRST|LAST functionality checks calling from script 
> runner tests.
> 
>
> Key: IGNITE-14779
> URL: https://issues.apache.org/jira/browse/IGNITE-14779
> Project: Ignite
>  Issue Type: Improvement
>  Components: sql
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Major
>  Labels: calcite
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> We have numerous tests under _order/test_nulls_first.test_ but they seems to 
> be failed due to *#pragma* specific parameters which are not take into 
> account while calcite tests are running.



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


[jira] [Updated] (IGNITE-14779) Calcite. Unblock NULLS FIRST|LAST functionality checks calling from script runner tests.

2021-05-25 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny updated IGNITE-14779:

Summary: Calcite. Unblock NULLS FIRST|LAST functionality checks calling 
from script runner tests.  (was: Unblock NULLS FIRST|LAST functionality checks 
calling from script runner tests.)

> Calcite. Unblock NULLS FIRST|LAST functionality checks calling from script 
> runner tests.
> 
>
> Key: IGNITE-14779
> URL: https://issues.apache.org/jira/browse/IGNITE-14779
> Project: Ignite
>  Issue Type: Improvement
>  Components: sql
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Major
>  Labels: calcite
>
> We have numerous tests under _order/test_nulls_first.test_ but they seems to 
> be failed due to *#pragma* specific parameters which are not take into 
> account while calcite tests are running.



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


[jira] [Created] (IGNITE-14779) Unblock NULLS FIRST|LAST functionality checks calling from script runner tests.

2021-05-25 Thread Stanilovsky Evgeny (Jira)
Stanilovsky Evgeny created IGNITE-14779:
---

 Summary: Unblock NULLS FIRST|LAST functionality checks calling 
from script runner tests.
 Key: IGNITE-14779
 URL: https://issues.apache.org/jira/browse/IGNITE-14779
 Project: Ignite
  Issue Type: Improvement
  Components: sql
Reporter: Stanilovsky Evgeny
Assignee: Stanilovsky Evgeny


We have numerous tests under _order/test_nulls_first.test_ but they seems to be 
failed due to *#pragma* specific parameters which are not take into account 
while calcite tests are running.



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


[jira] [Created] (IGNITE-14777) row_number() with window functions unsupported.

2021-05-25 Thread Stanilovsky Evgeny (Jira)
Stanilovsky Evgeny created IGNITE-14777:
---

 Summary: row_number() with window functions unsupported.
 Key: IGNITE-14777
 URL: https://issues.apache.org/jira/browse/IGNITE-14777
 Project: Ignite
  Issue Type: Improvement
  Components: sql
Reporter: Stanilovsky Evgeny


subclass of window queries with _row_number_ functionality are not supported 
for now.
examples:

{noformat}
SELECT i, j, row_number() OVER (PARTITION BY i ORDER BY j NULLS FIRST) FROM 
test ORDER BY i NULLS FIRST, j NULLS FIRST;
---
SELECT i, (SELECT row_number() OVER (ORDER BY i) FROM integers WHERE i1.i=i) 
FROM integers i1 ORDER BY i;
{noformat}




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


[jira] [Commented] (IGNITE-14750) NullPointerException when starting MaintenanceProcessor after upgrade from 2.9

2021-05-21 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-14750:
-

[~sdarlington] hello ! you said : "but it turns out to be a file" do you have 
ideas how this could happen ? Does file permissions are the same on whole nodes 
?

> NullPointerException when starting MaintenanceProcessor after upgrade from 2.9
> --
>
> Key: IGNITE-14750
> URL: https://issues.apache.org/jira/browse/IGNITE-14750
> Project: Ignite
>  Issue Type: Bug
>Affects Versions: 2.10
>Reporter: Stephen Darlington
>Assignee: Stephen Darlington
>Priority: Minor
> Fix For: 2.11
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Upgrading from Ignite 2.9 to 2.10, using persistence we got the following 
> error on one node. The other nodes started correctly. Ended up deleting the 
> persistence store and creating a new node.
> {{[2021-05-18 15:21:51,949][WARN ][main][MaintenanceProcessor] Caught 
> exception when starting MaintenanceProcessor, maintenance mode won't be 
> entered}}{{_java.lang.NullPointerException_}}{{_at 
> org.apache.ignite.internal.processors.cache.persistence.filename.PdsConsistentIdProcessor.visitFolder(PdsConsistentIdProcessor.java:246)_}}{{
> _at 
> org.apache.ignite.internal.processors.cache.persistence.filename.PdsConsistentIdProcessor.folderSize(PdsConsistentIdProcessor.java:234)_}}{{
> _at 
> org.apache.ignite.internal.processors.cache.persistence.filename.PdsConsistentIdProcessor.getPathDisplayableInfo(PdsConsistentIdProcessor.java:265)_}}{{
> _at 
> org.apache.ignite.internal.processors.cache.persistence.filename.PdsConsistentIdProcessor.prepareNewSettings(PdsConsistentIdProcessor.java:195)_}}{{
> _at 
> org.apache.ignite.internal.processors.cache.persistence.filename.PdsConsistentIdProcessor.resolveFolders(PdsConsistentIdProcessor.java:140)_}}{{
> _at 
> org.apache.ignite.internal.maintenance.MaintenanceFileStore.init(MaintenanceFileStore.java:103)_}}{{
> _at 
> org.apache.ignite.internal.maintenance.MaintenanceProcessor.start(MaintenanceProcessor.java:137)_}}{{
> _at 
> org.apache.ignite.internal.IgniteKernal.startProcessor(IgniteKernal.java:1986)_}}{{
> _at 
> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:1211)_}}{{
> _at 
> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:2112)_}}{{
> _at 
> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1758)_}}{{
> _at 
> org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1143)_}}{{
> _at 
> org.apache.ignite.internal.IgnitionEx.startConfigurations(IgnitionEx.java:1061)_}}{{
> _at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:947)_}}{{ 
>    _at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:846)_}}{{  
>   _at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:716)_}}{{   
>  _at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:685)_}}{{
> _at org.apache.ignite.Ignition.start(Ignition.java:353)_}}{{_at 
> org.apache.ignite.startup.cmdline.CommandLineStartup.main(CommandLineStartup.java:367)_}}



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


[jira] [Commented] (IGNITE-14737) Calcite. Equals predicate with multiple results from subqueries must fail.

2021-05-21 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-14737:
-

[~alex_pl], [~tledkov-gridgain] guys can u help with merge ? thanks 

> Calcite. Equals predicate with multiple results from subqueries must fail.  
> 
>
> Key: IGNITE-14737
> URL: https://issues.apache.org/jira/browse/IGNITE-14737
> Project: Ignite
>  Issue Type: Bug
>  Components: sql
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Major
>  Labels: calcite
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Suppose table looks like :
> *products*
> ||name||cat_id||subcat_id||
> |n1|1|10|
> |n2|2|10|
> |n3|3|11|
> and request :
> {noformat}
> SELECT NAME FROM products WHERE CAT_ID = (SELECT CAT_ID FROM products WHERE 
> SUBCAT_ID = 10)
> {noformat}
> for now it correctly executed and returns undefined results, proposal : 
> return ERROR and appropriate message.



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


[jira] [Commented] (IGNITE-12747) Calcite integration. Correlated queries support.

2021-05-21 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-12747:
-

[~alex_pl] fixed, can u check once more plz ? thanks 

> Calcite integration. Correlated queries support.
> 
>
> Key: IGNITE-12747
> URL: https://issues.apache.org/jira/browse/IGNITE-12747
> Project: Ignite
>  Issue Type: New Feature
>Reporter: Igor Seliverstov
>Assignee: Andrey Mashenkov
>Priority: Critical
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Rewrite correlated subqueries.
> Useful links:
> [https://zhuanlan.zhihu.com/p/60380557]
> [https://zhuanlan.zhihu.com/p/62338250]
> [https://zhuanlan.zhihu.com/p/66227661]
>  



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


[jira] [Created] (IGNITE-14757) Calcite. CorrelatedNestedLoopJoinRule with batched instantiation fail with current tests.

2021-05-21 Thread Stanilovsky Evgeny (Jira)
Stanilovsky Evgeny created IGNITE-14757:
---

 Summary: Calcite. CorrelatedNestedLoopJoinRule with batched 
instantiation fail with current tests.
 Key: IGNITE-14757
 URL: https://issues.apache.org/jira/browse/IGNITE-14757
 Project: Ignite
  Issue Type: Bug
  Components: sql
Reporter: Stanilovsky Evgeny


changing CorrelatedNestedLoopJoinRule#INSTANCE into 
CorrelatedNestedLoopJoinRule#INSTANCE_BATCHED and further call of 
IgniteCalciteTestSuite will stops all tets progress.



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


[jira] [Commented] (IGNITE-14739) Enable a permanent wal recording of transactions states records.

2021-05-21 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-14739:
-

 !screenshot-1.png! 

> Enable a permanent wal recording of transactions states records.
> 
>
> Key: IGNITE-14739
> URL: https://issues.apache.org/jira/browse/IGNITE-14739
> Project: Ignite
>  Issue Type: Improvement
>  Components: persistence
>Affects Versions: 2.10
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Major
> Attachments: screenshot-1.png
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> After [1] was merged, i suggest to enable transactions states wal logging on 
> a permanent basis. This will allow to correctly restore transactional states 
> after partial or whole nodes crash. 
> [1] https://issues.apache.org/jira/browse/IGNITE-6324



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


[jira] [Updated] (IGNITE-14739) Enable a permanent wal recording of transactions states records.

2021-05-21 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny updated IGNITE-14739:

Attachment: screenshot-1.png

> Enable a permanent wal recording of transactions states records.
> 
>
> Key: IGNITE-14739
> URL: https://issues.apache.org/jira/browse/IGNITE-14739
> Project: Ignite
>  Issue Type: Improvement
>  Components: persistence
>Affects Versions: 2.10
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Major
> Attachments: screenshot-1.png
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> After [1] was merged, i suggest to enable transactions states wal logging on 
> a permanent basis. This will allow to correctly restore transactional states 
> after partial or whole nodes crash. 
> [1] https://issues.apache.org/jira/browse/IGNITE-6324



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


[jira] [Commented] (IGNITE-14737) Calcite. Equals predicate with multiple results from subqueries must fail.

2021-05-20 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-14737:
-

[~korlov], [~alex_pl] thanks, all done.

> Calcite. Equals predicate with multiple results from subqueries must fail.  
> 
>
> Key: IGNITE-14737
> URL: https://issues.apache.org/jira/browse/IGNITE-14737
> Project: Ignite
>  Issue Type: Bug
>  Components: sql
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Major
>  Labels: calcite
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Suppose table looks like :
> *products*
> ||name||cat_id||subcat_id||
> |n1|1|10|
> |n2|2|10|
> |n3|3|11|
> and request :
> {noformat}
> SELECT NAME FROM products WHERE CAT_ID = (SELECT CAT_ID FROM products WHERE 
> SUBCAT_ID = 10)
> {noformat}
> for now it correctly executed and returns undefined results, proposal : 
> return ERROR and appropriate message.



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


[jira] [Commented] (IGNITE-14737) Calcite. Equals predicate with multiple results from subqueries must fail.

2021-05-19 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-14737:
-

[~alex_pl] fix your comments, check plz.

> Calcite. Equals predicate with multiple results from subqueries must fail.  
> 
>
> Key: IGNITE-14737
> URL: https://issues.apache.org/jira/browse/IGNITE-14737
> Project: Ignite
>  Issue Type: Bug
>  Components: sql
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Major
>  Labels: calcite
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Suppose table looks like :
> *products*
> ||name||cat_id||subcat_id||
> |n1|1|10|
> |n2|2|10|
> |n3|3|11|
> and request :
> {noformat}
> SELECT NAME FROM products WHERE CAT_ID = (SELECT CAT_ID FROM products WHERE 
> SUBCAT_ID = 10)
> {noformat}
> for now it correctly executed and returns undefined results, proposal : 
> return ERROR and appropriate message.



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


[jira] [Created] (IGNITE-14739) Enable a permanent wal recording of transactions states records.

2021-05-19 Thread Stanilovsky Evgeny (Jira)
Stanilovsky Evgeny created IGNITE-14739:
---

 Summary: Enable a permanent wal recording of transactions states 
records.
 Key: IGNITE-14739
 URL: https://issues.apache.org/jira/browse/IGNITE-14739
 Project: Ignite
  Issue Type: Improvement
  Components: persistence
Affects Versions: 2.10
Reporter: Stanilovsky Evgeny
Assignee: Stanilovsky Evgeny


After [1] was merged, i suggest to enable transactions states wal logging on a 
permanent basis. This will allow to correctly restore transactional states 
after partial or whole nodes crash. 

[1] https://issues.apache.org/jira/browse/IGNITE-6324




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


[jira] [Updated] (IGNITE-14737) Calcite. Equals predicate with multiple results from subqueries must fail.

2021-05-18 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny updated IGNITE-14737:

Description: 
Suppose table looks like :

*products*
||name||cat_id||subcat_id||
|n1|1|10|
|n2|2|10|
|n3|3|11|

and request :

{noformat}
SELECT NAME FROM products WHERE CAT_ID = (SELECT CAT_ID FROM products WHERE 
SUBCAT_ID = 10)
{noformat}

for now it correctly executed and returns undefined results, proposal : return 
ERROR and appropriate message.


  was:
Suppose table looks like :

*products*
||name||cat_id||subcat_id||
|n1|1|10|
|n2|2|10|
|n3|3|11|

and request :

{noformat}
SELECT NAME FROM products WHERE CAT_ID = (SELECT CAT_ID FROM products WHERE 
SUBCAT_ID = 10)
{noformat}

for now it correctly executed and returns undefined results, proposal : return 
"ERROR: more than one row returned by a subquery used as an expression".



> Calcite. Equals predicate with multiple results from subqueries must fail.  
> 
>
> Key: IGNITE-14737
> URL: https://issues.apache.org/jira/browse/IGNITE-14737
> Project: Ignite
>  Issue Type: Bug
>  Components: sql
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Major
>  Labels: calcite
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Suppose table looks like :
> *products*
> ||name||cat_id||subcat_id||
> |n1|1|10|
> |n2|2|10|
> |n3|3|11|
> and request :
> {noformat}
> SELECT NAME FROM products WHERE CAT_ID = (SELECT CAT_ID FROM products WHERE 
> SUBCAT_ID = 10)
> {noformat}
> for now it correctly executed and returns undefined results, proposal : 
> return ERROR and appropriate message.



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


[jira] [Created] (IGNITE-14737) Calcite. Equals predicate with multiple results from subqueries must fail.

2021-05-18 Thread Stanilovsky Evgeny (Jira)
Stanilovsky Evgeny created IGNITE-14737:
---

 Summary: Calcite. Equals predicate with multiple results from 
subqueries must fail.  
 Key: IGNITE-14737
 URL: https://issues.apache.org/jira/browse/IGNITE-14737
 Project: Ignite
  Issue Type: Improvement
  Components: sql
Reporter: Stanilovsky Evgeny
Assignee: Stanilovsky Evgeny


Suppose table looks like :

*products*
||name||cat_id||subcat_id||
|n1|1|10|
|n2|2|10|
|n3|3|11|

and request :

{noformat}
SELECT NAME FROM products WHERE CAT_ID = (SELECT CAT_ID FROM products WHERE 
SUBCAT_ID = 10)
{noformat}

for now it correctly executed and returns undefined results, proposal : return 
"ERROR: more than one row returned by a subquery used as an expression".




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


[jira] [Updated] (IGNITE-14737) Calcite. Equals predicate with multiple results from subqueries must fail.

2021-05-18 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny updated IGNITE-14737:

Issue Type: Bug  (was: Improvement)

> Calcite. Equals predicate with multiple results from subqueries must fail.  
> 
>
> Key: IGNITE-14737
> URL: https://issues.apache.org/jira/browse/IGNITE-14737
> Project: Ignite
>  Issue Type: Bug
>  Components: sql
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Major
>  Labels: calcite
>
> Suppose table looks like :
> *products*
> ||name||cat_id||subcat_id||
> |n1|1|10|
> |n2|2|10|
> |n3|3|11|
> and request :
> {noformat}
> SELECT NAME FROM products WHERE CAT_ID = (SELECT CAT_ID FROM products WHERE 
> SUBCAT_ID = 10)
> {noformat}
> for now it correctly executed and returns undefined results, proposal : 
> return "ERROR: more than one row returned by a subquery used as an 
> expression".



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


[jira] [Commented] (IGNITE-12747) Calcite integration. Correlated queries support.

2021-05-17 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-12747:
-

fix ready for review, [~korlov], [~alex_pl] plz take a look?

> Calcite integration. Correlated queries support.
> 
>
> Key: IGNITE-12747
> URL: https://issues.apache.org/jira/browse/IGNITE-12747
> Project: Ignite
>  Issue Type: New Feature
>Reporter: Igor Seliverstov
>Assignee: Andrey Mashenkov
>Priority: Critical
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Rewrite correlated subqueries.
> Useful links:
> [https://zhuanlan.zhihu.com/p/60380557]
> [https://zhuanlan.zhihu.com/p/62338250]
> [https://zhuanlan.zhihu.com/p/66227661]
>  



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


[jira] [Commented] (IGNITE-8719) Index left partially built if a node crashes during index create or rebuild

2021-05-17 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-8719:


[~ktkale...@gridgain.com] plz check one more comment from my side, overall 
looks good.

> Index left partially built if a node crashes during index create or rebuild
> ---
>
> Key: IGNITE-8719
> URL: https://issues.apache.org/jira/browse/IGNITE-8719
> Project: Ignite
>  Issue Type: Bug
>  Components: sql
>Reporter: Alexey Goncharuk
>Assignee: Kirill Tkalenko
>Priority: Critical
> Fix For: 2.11
>
> Attachments: IndexRebuildAfterNodeCrashTest.java, 
> IndexRebuildingTest.java
>
>  Time Spent: 3h 50m
>  Remaining Estimate: 0h
>
> Currently, we do not have any state associated with the index tree. Consider 
> the following scenario:
> 1) Start node, put some data
> 2) start CREATE INDEX operation
> 3) Wait for a checkpoint and stop node before index create finished
> 4) Restart node
> Since the checkpoint finished, the new index tree will be persisted to the 
> disk, but not all data will be present in the index.
> We should somehow store information about initializing index tree and mark it 
> valid only after all data is indexed. The state should be persisted as well.



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


[jira] [Created] (IGNITE-14721) Calcite. SOME with subquery consume huge time.

2021-05-14 Thread Stanilovsky Evgeny (Jira)
Stanilovsky Evgeny created IGNITE-14721:
---

 Summary: Calcite. SOME with subquery consume huge time.
 Key: IGNITE-14721
 URL: https://issues.apache.org/jira/browse/IGNITE-14721
 Project: Ignite
  Issue Type: Improvement
  Components: sql
Reporter: Stanilovsky Evgeny


Table of 7 rows and further request :

{noformat}
SELECT name FROM Orders o WHERE name <= SOME (SELECT name FROM Orders o)
{noformat}

consume 1 min 21 sec for now.




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


[jira] [Commented] (IGNITE-14490) cache.invoke() triggers failure handler and freezes if entry processor is not urideployed

2021-05-12 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-14490:
-

looks good, plz proceed.

> cache.invoke() triggers failure handler and freezes if entry processor is not 
> urideployed
> -
>
> Key: IGNITE-14490
> URL: https://issues.apache.org/jira/browse/IGNITE-14490
> Project: Ignite
>  Issue Type: Bug
>Affects Versions: 2.10
>Reporter: Ilya Kasnacheev
>Assignee: Ilya Kasnacheev
>Priority: Major
> Attachments: LoclerMain.java
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> If URI deployment is specified
> Caused by: java.lang.ClassNotFoundException: [Ljava.lang.StackTraceElement;"



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


[jira] [Updated] (IGNITE-14713) Calcite. Explain failed for subquery expression.

2021-05-12 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny updated IGNITE-14713:

Issue Type: Bug  (was: Improvement)

> Calcite. Explain failed for subquery expression.
> 
>
> Key: IGNITE-14713
> URL: https://issues.apache.org/jira/browse/IGNITE-14713
> Project: Ignite
>  Issue Type: Bug
>  Components: sql
>Reporter: Stanilovsky Evgeny
>Priority: Major
>  Labels: calcite
>
> Failure test:
> {code:java}
>@Test
> public void test0() throws Exception {
> IgniteCache cache = grid(0).getOrCreateCache(
> new CacheConfiguration("test")
> .setBackups(1)
> .setIndexedTypes(Integer.class, Integer.class)
> );
> for (int i = 0; i < 100; i++)
> cache.put(i, i);
> awaitPartitionMapExchange();
> // Correlated INNER join.
> checkQuery("explain plan for SELECT t._val FROM \"test\".Integer t 
> WHERE t._val < 5 AND " +
> "t._key in (SELECT x FROM table(system_range(t._val, t._val))) ")
> .check();
> }
> {code}



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


[jira] [Created] (IGNITE-14713) Calcite. Explain failed for subquery expression.

2021-05-12 Thread Stanilovsky Evgeny (Jira)
Stanilovsky Evgeny created IGNITE-14713:
---

 Summary: Calcite. Explain failed for subquery expression.
 Key: IGNITE-14713
 URL: https://issues.apache.org/jira/browse/IGNITE-14713
 Project: Ignite
  Issue Type: Improvement
  Components: sql
Reporter: Stanilovsky Evgeny


Failure test:
{code:java}
   @Test
public void test0() throws Exception {
IgniteCache cache = grid(0).getOrCreateCache(
new CacheConfiguration("test")
.setBackups(1)
.setIndexedTypes(Integer.class, Integer.class)
);

for (int i = 0; i < 100; i++)
cache.put(i, i);

awaitPartitionMapExchange();

// Correlated INNER join.
checkQuery("explain plan for SELECT t._val FROM \"test\".Integer t 
WHERE t._val < 5 AND " +
"t._key in (SELECT x FROM table(system_range(t._val, t._val))) ")
.check();
}
{code}




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


[jira] [Commented] (IGNITE-8719) Index left partially built if a node crashes during index create or rebuild

2021-05-12 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-8719:


[~ktkale...@gridgain.com] plz check my comments, if you ok with my proposals i 
would like to review it once more after fixes, thanks ! 

> Index left partially built if a node crashes during index create or rebuild
> ---
>
> Key: IGNITE-8719
> URL: https://issues.apache.org/jira/browse/IGNITE-8719
> Project: Ignite
>  Issue Type: Bug
>  Components: sql
>Reporter: Alexey Goncharuk
>Assignee: Kirill Tkalenko
>Priority: Critical
> Fix For: 2.11
>
> Attachments: IndexRebuildAfterNodeCrashTest.java, 
> IndexRebuildingTest.java
>
>  Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> Currently, we do not have any state associated with the index tree. Consider 
> the following scenario:
> 1) Start node, put some data
> 2) start CREATE INDEX operation
> 3) Wait for a checkpoint and stop node before index create finished
> 4) Restart node
> Since the checkpoint finished, the new index tree will be persisted to the 
> disk, but not all data will be present in the index.
> We should somehow store information about initializing index tree and mark it 
> valid only after all data is indexed. The state should be persisted as well.



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


[jira] [Commented] (IGNITE-14612) Calcite. SELECT with CASE without boolean expression - fails.

2021-04-30 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-14612:
-

[~tledkov-gridgain] can u merge it ?

> Calcite. SELECT with CASE without boolean expression - fails.
> -
>
> Key: IGNITE-14612
> URL: https://issues.apache.org/jira/browse/IGNITE-14612
> Project: Ignite
>  Issue Type: Bug
>  Components: sql
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Major
>  Labels: calcite
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> For example such expression - fails.
> {noformat}
> SELECT CASE WHEN 1 THEN 13 ELSE 12 END;{noformat}
> failed with:
> {code:java}
> class org.apache.ignite.IgniteException: Error at: 
> test_constant_comparisons.test:91. sql: SELECT CASE WHEN 1 THEN 13 ELSE 12 
> END;
>   at 
> org.apache.ignite.internal.processors.query.calcite.logical.SqlScriptRunner$Query.execute(SqlScriptRunner.java:518)
>   at 
> org.apache.ignite.internal.processors.query.calcite.logical.SqlScriptRunner.run(SqlScriptRunner.java:93)
>   at 
> org.apache.ignite.internal.processors.query.calcite.logical.ScriptTestRunner$1.run(ScriptTestRunner.java:214)
>   at java.lang.Thread.run(Thread.java:748)
> Caused by: class 
> org.apache.ignite.internal.processors.query.IgniteSQLException: Failed to 
> plan query.
>   at 
> org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.prepareQuery(ExecutionServiceImpl.java:541)
>   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:398)
>   at 
> org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.query(CalciteQueryProcessor.java:246)
>   at 
> org.apache.ignite.internal.processors.query.calcite.logical.SqlScriptRunner.sql(SqlScriptRunner.java:111)
>   at 
> org.apache.ignite.internal.processors.query.calcite.logical.SqlScriptRunner.access$600(SqlScriptRunner.java:51)
>   at 
> org.apache.ignite.internal.processors.query.calcite.logical.SqlScriptRunner$Query.execute(SqlScriptRunner.java:513)
>   ... 3 more
> Caused by: org.apache.calcite.runtime.CalciteContextException: From line 1, 
> column 8 to line 1, column 38: Expected a boolean type
>   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>   at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
>   at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>   at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
>   at 
> org.apache.calcite.runtime.Resources$ExInstWithCause.ex(Resources.java:467)
>   at org.apache.calcite.sql.SqlUtil.newContextException(SqlUtil.java:883)
> {code}
> and this work perfectly well:
> {noformat}
> SELECT CASE WHEN 1=1 THEN 13 ELSE 12 END;{noformat}
> a little reserch shows that calcite also fails in non boolean expression, 
> root cause in 
> SqlCaseOperator#checkOperandTypes and further check : 
> {code:java}
> if (!SqlTypeUtil.inBooleanFamily(type){code} if we change this place, 
> appropriate test
> {noformat}
>   @Test void testCaseWhen2() {
> checkPlanEquals("SELECT CASE WHEN 1 THEN 13 ELSE 12 END");
>   }{noformat}
> will work fine in calcite but will fail in ignite with janino error:
> {noformat}
> class org.apache.ignite.IgniteException: Line 3, Column 7: Not a boolean 
> expression
>   at 
> org.apache.ignite.internal.processors.query.calcite.util.Commons.compile(Commons.java:299)
>   at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.ExpressionFactoryImpl.compile(ExpressionFactoryImpl.java:290)
>   at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.ExpressionFactoryImpl.lambda$scalar$4(ExpressionFactoryImpl.java:241)
>   at 
> java.util.concurrent.ConcurrentMap.computeIfAbsent(ConcurrentMap.java:324)
>   at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.ExpressionFactoryImpl.scalar(ExpressionFactoryImpl.java:241)
>   at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.ExpressionFactoryImpl.project(ExpressionFactoryImpl.java:198)
>   at 
> org.apache.ignite.internal.processors.query.calcite.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:195)
>   at 
> org.apache.ignite.internal.processors.query.calcite.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:102)
>   at 
> 

[jira] [Updated] (IGNITE-6324) Transactional cache data partially available after crash and further recovery.

2021-04-29 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny updated IGNITE-6324:
---
Release Note: Before this fix it was possible to obtain persistent data in 
inconsistent state. For example: 2 nodes with persistence  and 0 backups, 
transaction (tx) update data cross nodes (all nodes are involved into tx 
update) and in the middle of commiting phase something happens with bare metal 
or possibly jvm crash raises on one of existing nodes, second one will detect 
it and rollback process will be triggered, some time later crashed node will be 
fixed and returned into cluster after recovery from wal it would be possible to 
observe data from rolled back tx.  Now this situation is still possible if 
there is no -DIGNITE_WAL_LOG_TX_RECORDS=true appropriate flag, i plan to 
trigger one more ticket for changing this flag defaults.  (was: Before this fix 
it was possible to obtain persistent data in inconsistent state. For example: 2 
nodes with persistence  and 0 backups, transaction (tx) update data cross nodes 
(all nodes are involved into tx update) and in the middle of commiting phase 
something happens with bare metal or possibly jvm crash raises on one of 
existing nodes, second one will detect it and rollback process will be 
triggered, some time later crashed node will be fixed and returned into cluster 
after recovery from wal it would be possible to observe data from rolled back 
tx. )

> Transactional cache data partially available after crash and further recovery.
> --
>
> Key: IGNITE-6324
> URL: https://issues.apache.org/jira/browse/IGNITE-6324
> Project: Ignite
>  Issue Type: Bug
>  Components: persistence
>Affects Versions: 2.10
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Critical
> Fix For: 2.11
>
> Attachments: InterruptCommitedThreadTest.java
>
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> If InterruptedException raise in client code during pds store operations we 
> can obtain inconsistent cache after restart. 



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


[jira] [Updated] (IGNITE-6324) Transactional cache data partially available after crash and further recovery.

2021-04-29 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny updated IGNITE-6324:
---
Release Note: Before this fix it was possible to obtain persistent data in 
inconsistent state. For example: 2 nodes with persistence  and 0 backups, 
transaction (tx) update data cross nodes (all nodes are involved into tx 
update) and in the middle of commiting phase something happens with bare metal 
or possibly jvm crash raises on one of existing nodes, second one will detect 
it and rollback process will be triggered, some time later crashed node will be 
fixed and returned into cluster after recovery from wal it would be possible to 
observe data from rolled back tx. 

> Transactional cache data partially available after crash and further recovery.
> --
>
> Key: IGNITE-6324
> URL: https://issues.apache.org/jira/browse/IGNITE-6324
> Project: Ignite
>  Issue Type: Bug
>  Components: persistence
>Affects Versions: 2.10
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Critical
> Fix For: 2.11
>
> Attachments: InterruptCommitedThreadTest.java
>
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> If InterruptedException raise in client code during pds store operations we 
> can obtain inconsistent cache after restart. 



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


[jira] [Commented] (IGNITE-14543) Calcite engine. Agregate functions fail on scalar values

2021-04-28 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-14543:
-

looks good.

> Calcite engine. Agregate functions fail on scalar values
> 
>
> Key: IGNITE-14543
> URL: https://issues.apache.org/jira/browse/IGNITE-14543
> Project: Ignite
>  Issue Type: Bug
>Reporter: Taras Ledkov
>Assignee: Konstantin Orlov
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Failed queries:
> {{SELECT COUNT(*)}}
> {{SELECT COUNT(NULL)}}
> {{SELECT AVG(NULL)}}
> Tests:
> {{aggregate/aggregates/test_count.test_ignored}}
> {{aggregate/aggregates/test_aggregate_types_scalar.test_ignore}}
> {{aggregate/aggregates/test_avg.test}}



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


[jira] [Updated] (IGNITE-14612) Calcite. SELECT with CASE without boolean expression - fails.

2021-04-28 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny updated IGNITE-14612:

Description: 
For example such expression - fails.
{noformat}
SELECT CASE WHEN 1 THEN 13 ELSE 12 END;{noformat}

failed with:

{code:java}
class org.apache.ignite.IgniteException: Error at: 
test_constant_comparisons.test:91. sql: SELECT CASE WHEN 1 THEN 13 ELSE 12 END;

at 
org.apache.ignite.internal.processors.query.calcite.logical.SqlScriptRunner$Query.execute(SqlScriptRunner.java:518)
at 
org.apache.ignite.internal.processors.query.calcite.logical.SqlScriptRunner.run(SqlScriptRunner.java:93)
at 
org.apache.ignite.internal.processors.query.calcite.logical.ScriptTestRunner$1.run(ScriptTestRunner.java:214)
at java.lang.Thread.run(Thread.java:748)
Caused by: class 
org.apache.ignite.internal.processors.query.IgniteSQLException: Failed to plan 
query.
at 
org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.prepareQuery(ExecutionServiceImpl.java:541)
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:398)
at 
org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.query(CalciteQueryProcessor.java:246)
at 
org.apache.ignite.internal.processors.query.calcite.logical.SqlScriptRunner.sql(SqlScriptRunner.java:111)
at 
org.apache.ignite.internal.processors.query.calcite.logical.SqlScriptRunner.access$600(SqlScriptRunner.java:51)
at 
org.apache.ignite.internal.processors.query.calcite.logical.SqlScriptRunner$Query.execute(SqlScriptRunner.java:513)
... 3 more
Caused by: org.apache.calcite.runtime.CalciteContextException: From line 1, 
column 8 to line 1, column 38: Expected a boolean type
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at 
org.apache.calcite.runtime.Resources$ExInstWithCause.ex(Resources.java:467)
at org.apache.calcite.sql.SqlUtil.newContextException(SqlUtil.java:883)
{code}

and this work perfectly well:
{noformat}
SELECT CASE WHEN 1=1 THEN 13 ELSE 12 END;{noformat}

a little reserch shows that calcite also fails in non boolean expression, root 
cause in 
SqlCaseOperator#checkOperandTypes and further check : 
{code:java}
if (!SqlTypeUtil.inBooleanFamily(type){code} if we change this place, 
appropriate test

{noformat}
  @Test void testCaseWhen2() {
checkPlanEquals("SELECT CASE WHEN 1 THEN 13 ELSE 12 END");
  }{noformat}
will work fine in calcite but will fail in ignite with janino error:

{noformat}
class org.apache.ignite.IgniteException: Line 3, Column 7: Not a boolean 
expression

at 
org.apache.ignite.internal.processors.query.calcite.util.Commons.compile(Commons.java:299)
at 
org.apache.ignite.internal.processors.query.calcite.exec.exp.ExpressionFactoryImpl.compile(ExpressionFactoryImpl.java:290)
at 
org.apache.ignite.internal.processors.query.calcite.exec.exp.ExpressionFactoryImpl.lambda$scalar$4(ExpressionFactoryImpl.java:241)
at 
java.util.concurrent.ConcurrentMap.computeIfAbsent(ConcurrentMap.java:324)
at 
org.apache.ignite.internal.processors.query.calcite.exec.exp.ExpressionFactoryImpl.scalar(ExpressionFactoryImpl.java:241)
at 
org.apache.ignite.internal.processors.query.calcite.exec.exp.ExpressionFactoryImpl.project(ExpressionFactoryImpl.java:198)
at 
org.apache.ignite.internal.processors.query.calcite.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:195)
at 
org.apache.ignite.internal.processors.query.calcite.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:102)
at 
org.apache.ignite.internal.processors.query.calcite.rel.IgniteProject.accept(IgniteProject.java:89)
at 
org.apache.ignite.internal.processors.query.calcite.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:615)
at 
org.apache.ignite.internal.processors.query.calcite.exec.LogicalRelImplementor.go(LogicalRelImplementor.java:630)
at 
org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.executeQuery(ExecutionServiceImpl.java:752)
at 
org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.executePlan(ExecutionServiceImpl.java:692)
at 
org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.executePlans(ExecutionServiceImpl.java:418)

[jira] [Commented] (IGNITE-6324) Transactional cache data partially available after crash and further recovery.

2021-04-26 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-6324:


[~sergey-chugunov] i complete with your comments.

> Transactional cache data partially available after crash and further recovery.
> --
>
> Key: IGNITE-6324
> URL: https://issues.apache.org/jira/browse/IGNITE-6324
> Project: Ignite
>  Issue Type: Bug
>  Components: persistence
>Affects Versions: 2.10
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Critical
> Attachments: InterruptCommitedThreadTest.java
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> If InterruptedException raise in client code during pds store operations we 
> can obtain inconsistent cache after restart. 



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


[jira] [Created] (IGNITE-14648) Calcite. Fallback into h2 engine only "alter table|(create|drop) index" commands.

2021-04-24 Thread Stanilovsky Evgeny (Jira)
Stanilovsky Evgeny created IGNITE-14648:
---

 Summary: Calcite. Fallback into h2 engine only "alter 
table|(create|drop) index" commands.
 Key: IGNITE-14648
 URL: https://issues.apache.org/jira/browse/IGNITE-14648
 Project: Ignite
  Issue Type: Improvement
  Components: sql
Reporter: Stanilovsky Evgeny
Assignee: Stanilovsky Evgeny


After numerous fixes for now we need to fallback into h2 engine only _alter 
table _and index manipulation requests.



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


[jira] [Commented] (IGNITE-14623) Calcite. Sort out test scripts at: sql/aggregate/aggregates/*

2021-04-23 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-14623:
-

1 minor comment, overall looks good

> Calcite. Sort out test scripts at: sql/aggregate/aggregates/*
> -
>
> Key: IGNITE-14623
> URL: https://issues.apache.org/jira/browse/IGNITE-14623
> Project: Ignite
>  Issue Type: Task
>Reporter: Taras Ledkov
>Assignee: Taras Ledkov
>Priority: Major
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Calcite. Sort out test scripts at: {{sql/aggregate/aggregates/*}}



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


[jira] [Commented] (IGNITE-6324) Transactional cache data partially available after crash and further recovery.

2021-04-22 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-6324:


[~sergey-chugunov] thanks for review, i fix all your comments.

> Transactional cache data partially available after crash and further recovery.
> --
>
> Key: IGNITE-6324
> URL: https://issues.apache.org/jira/browse/IGNITE-6324
> Project: Ignite
>  Issue Type: Bug
>  Components: persistence
>Affects Versions: 2.10
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Critical
> Attachments: InterruptCommitedThreadTest.java
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> If InterruptedException raise in client code during pds store operations we 
> can obtain inconsistent cache after restart. 



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


[jira] [Commented] (IGNITE-14573) DML operations failure.

2021-04-21 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-14573:
-

[~korlov] thanks ! fixed.

> DML operations failure.
> ---
>
> Key: IGNITE-14573
> URL: https://issues.apache.org/jira/browse/IGNITE-14573
> Project: Ignite
>  Issue Type: Improvement
>  Components: sql
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Major
>  Labels: calcite
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> As a result, insert with further read operations will fail.
> For example:
> {code:java}
> CREATE TABLE IF NOT EXISTS test (id INTEGER, a INTEGER);
> INSERT INTO test VALUES (1, 1), (2, 2), (3, 3), (4, NULL);"
> UPDATE test SET a=CASE WHEN id=1 THEN 7 ELSE NULL END WHERE id <= 2";
> {code}



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


[jira] [Comment Edited] (IGNITE-14612) Calcite. SELECT with CASE without boolean expression - fails.

2021-04-21 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny edited comment on IGNITE-14612 at 4/21/21, 12:21 PM:


[~korlov], [~tledkov-gridgain] guys plz check this fix ?
@ScriptRunnerTestsEnvironment(scriptsRoot = "src/test/sql", regex = 
"/filter/test_constant_comparisons.test") tests are ok for now.


was (Author: zstan):
[~korlov], [~tledkov-gridgain] guys plz check this fix ?

> Calcite. SELECT with CASE without boolean expression - fails.
> -
>
> Key: IGNITE-14612
> URL: https://issues.apache.org/jira/browse/IGNITE-14612
> Project: Ignite
>  Issue Type: Bug
>  Components: sql
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Major
>  Labels: calcite
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> For example such expression - fails.
> {noformat}
> SELECT CASE WHEN 1 THEN 13 ELSE 12 END;{noformat}
> failed with:
> {code:java}
> class org.apache.ignite.IgniteException: Error at: 
> test_constant_comparisons.test:91. sql: SELECT CASE WHEN 1 THEN 13 ELSE 12 
> END;
>   at 
> org.apache.ignite.internal.processors.query.calcite.logical.SqlScriptRunner$Query.execute(SqlScriptRunner.java:518)
>   at 
> org.apache.ignite.internal.processors.query.calcite.logical.SqlScriptRunner.run(SqlScriptRunner.java:93)
>   at 
> org.apache.ignite.internal.processors.query.calcite.logical.ScriptTestRunner$1.run(ScriptTestRunner.java:214)
>   at java.lang.Thread.run(Thread.java:748)
> Caused by: class 
> org.apache.ignite.internal.processors.query.IgniteSQLException: Failed to 
> plan query.
>   at 
> org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.prepareQuery(ExecutionServiceImpl.java:541)
>   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:398)
>   at 
> org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.query(CalciteQueryProcessor.java:246)
>   at 
> org.apache.ignite.internal.processors.query.calcite.logical.SqlScriptRunner.sql(SqlScriptRunner.java:111)
>   at 
> org.apache.ignite.internal.processors.query.calcite.logical.SqlScriptRunner.access$600(SqlScriptRunner.java:51)
>   at 
> org.apache.ignite.internal.processors.query.calcite.logical.SqlScriptRunner$Query.execute(SqlScriptRunner.java:513)
>   ... 3 more
> Caused by: org.apache.calcite.runtime.CalciteContextException: From line 1, 
> column 8 to line 1, column 38: Expected a boolean type
>   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>   at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
>   at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>   at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
>   at 
> org.apache.calcite.runtime.Resources$ExInstWithCause.ex(Resources.java:467)
>   at org.apache.calcite.sql.SqlUtil.newContextException(SqlUtil.java:883)
> {code}
> and this work perfectly well:
> {noformat}
> SELECT CASE WHEN 1=1 THEN 13 ELSE 12 END;{noformat}
> a little reserch shows that calcite also fails in non boolean expression, 
> root cause in 
> SqlCaseOperator#checkOperandTypes and further check : 
> {code:java}
> if (!SqlTypeUtil.inBooleanFamily(type){code} if we change this place, 
> appropriate test
> {noformat}
>   @Test void testCaseWhen2() {
> checkPlanEquals("SELECT CASE WHEN 1=1 THEN 13 ELSE 12 END");
>   }{noformat}
> will work fine in calcite but will fail in ignite with janino error:
> {noformat}
> class org.apache.ignite.IgniteException: Line 3, Column 7: Not a boolean 
> expression
>   at 
> org.apache.ignite.internal.processors.query.calcite.util.Commons.compile(Commons.java:299)
>   at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.ExpressionFactoryImpl.compile(ExpressionFactoryImpl.java:290)
>   at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.ExpressionFactoryImpl.lambda$scalar$4(ExpressionFactoryImpl.java:241)
>   at 
> java.util.concurrent.ConcurrentMap.computeIfAbsent(ConcurrentMap.java:324)
>   at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.ExpressionFactoryImpl.scalar(ExpressionFactoryImpl.java:241)
>   at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.ExpressionFactoryImpl.project(ExpressionFactoryImpl.java:198)
>   at 
> 

[jira] [Updated] (IGNITE-14617) Calcite. Add opportunity to use NUMERIC in WHEN syntax.

2021-04-21 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny updated IGNITE-14617:

Description: 
Probably we need to support such kind of expressions:

{noformat}
SELECT CASE WHEN 1 THEN 13 ELSE 12 END;
{noformat}

_WHEN 1=1_ - works correctly in such case. Additional info was given in [1]

[1] https://issues.apache.org/jira/browse/IGNITE-14612


  was:
Probably we need to support such kind of expressions:

{noformat}
SELECT CASE WHEN 1 THEN 13 ELSE 12 END;
{noformat}

_WHEN 1=1_ - works correctly in such case.



> Calcite. Add opportunity to use NUMERIC in WHEN syntax.
> ---
>
> Key: IGNITE-14617
> URL: https://issues.apache.org/jira/browse/IGNITE-14617
> Project: Ignite
>  Issue Type: Improvement
>  Components: sql
>Reporter: Stanilovsky Evgeny
>Priority: Major
>  Labels: calcite
>
> Probably we need to support such kind of expressions:
> {noformat}
> SELECT CASE WHEN 1 THEN 13 ELSE 12 END;
> {noformat}
> _WHEN 1=1_ - works correctly in such case. Additional info was given in [1]
> [1] https://issues.apache.org/jira/browse/IGNITE-14612



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


[jira] [Created] (IGNITE-14617) Calcite. Add opportunity to use NUMERIC in WHEN syntax.

2021-04-21 Thread Stanilovsky Evgeny (Jira)
Stanilovsky Evgeny created IGNITE-14617:
---

 Summary: Calcite. Add opportunity to use NUMERIC in WHEN syntax.
 Key: IGNITE-14617
 URL: https://issues.apache.org/jira/browse/IGNITE-14617
 Project: Ignite
  Issue Type: Improvement
  Components: sql
Reporter: Stanilovsky Evgeny


Probably we need to support such kind of expressions:

{noformat}
SELECT CASE WHEN 1 THEN 13 ELSE 12 END;
{noformat}

_WHEN 1=1_ - works correctly in such case.




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


[jira] [Created] (IGNITE-14612) Calcite. SELECT with CASE without boolean expression - fails.

2021-04-21 Thread Stanilovsky Evgeny (Jira)
Stanilovsky Evgeny created IGNITE-14612:
---

 Summary: Calcite. SELECT with CASE without boolean expression - 
fails.
 Key: IGNITE-14612
 URL: https://issues.apache.org/jira/browse/IGNITE-14612
 Project: Ignite
  Issue Type: Bug
  Components: sql
Reporter: Stanilovsky Evgeny
Assignee: Stanilovsky Evgeny


For example such expression - fails.
{noformat}
SELECT CASE WHEN 1 THEN 13 ELSE 12 END;{noformat}

failed with:

{code:java}
class org.apache.ignite.IgniteException: Error at: 
test_constant_comparisons.test:91. sql: SELECT CASE WHEN 1 THEN 13 ELSE 12 END;

at 
org.apache.ignite.internal.processors.query.calcite.logical.SqlScriptRunner$Query.execute(SqlScriptRunner.java:518)
at 
org.apache.ignite.internal.processors.query.calcite.logical.SqlScriptRunner.run(SqlScriptRunner.java:93)
at 
org.apache.ignite.internal.processors.query.calcite.logical.ScriptTestRunner$1.run(ScriptTestRunner.java:214)
at java.lang.Thread.run(Thread.java:748)
Caused by: class 
org.apache.ignite.internal.processors.query.IgniteSQLException: Failed to plan 
query.
at 
org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.prepareQuery(ExecutionServiceImpl.java:541)
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:398)
at 
org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.query(CalciteQueryProcessor.java:246)
at 
org.apache.ignite.internal.processors.query.calcite.logical.SqlScriptRunner.sql(SqlScriptRunner.java:111)
at 
org.apache.ignite.internal.processors.query.calcite.logical.SqlScriptRunner.access$600(SqlScriptRunner.java:51)
at 
org.apache.ignite.internal.processors.query.calcite.logical.SqlScriptRunner$Query.execute(SqlScriptRunner.java:513)
... 3 more
Caused by: org.apache.calcite.runtime.CalciteContextException: From line 1, 
column 8 to line 1, column 38: Expected a boolean type
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at 
org.apache.calcite.runtime.Resources$ExInstWithCause.ex(Resources.java:467)
at org.apache.calcite.sql.SqlUtil.newContextException(SqlUtil.java:883)
{code}

and this work perfectly well:
{noformat}
SELECT CASE WHEN 1=1 THEN 13 ELSE 12 END;{noformat}

a little reserch shows that calcite also fails in non boolean expression, root 
cause in 
SqlCaseOperator#checkOperandTypes and further check : 
{code:java}
if (!SqlTypeUtil.inBooleanFamily(type){code} if we change this place, 
appropriate test

{noformat}
  @Test void testCaseWhen2() {
checkPlanEquals("SELECT CASE WHEN 1=1 THEN 13 ELSE 12 END");
  }{noformat}
will work fine in calcite but will fail in ignite with janino error:

{noformat}
class org.apache.ignite.IgniteException: Line 3, Column 7: Not a boolean 
expression

at 
org.apache.ignite.internal.processors.query.calcite.util.Commons.compile(Commons.java:299)
at 
org.apache.ignite.internal.processors.query.calcite.exec.exp.ExpressionFactoryImpl.compile(ExpressionFactoryImpl.java:290)
at 
org.apache.ignite.internal.processors.query.calcite.exec.exp.ExpressionFactoryImpl.lambda$scalar$4(ExpressionFactoryImpl.java:241)
at 
java.util.concurrent.ConcurrentMap.computeIfAbsent(ConcurrentMap.java:324)
at 
org.apache.ignite.internal.processors.query.calcite.exec.exp.ExpressionFactoryImpl.scalar(ExpressionFactoryImpl.java:241)
at 
org.apache.ignite.internal.processors.query.calcite.exec.exp.ExpressionFactoryImpl.project(ExpressionFactoryImpl.java:198)
at 
org.apache.ignite.internal.processors.query.calcite.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:195)
at 
org.apache.ignite.internal.processors.query.calcite.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:102)
at 
org.apache.ignite.internal.processors.query.calcite.rel.IgniteProject.accept(IgniteProject.java:89)
at 
org.apache.ignite.internal.processors.query.calcite.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:615)
at 
org.apache.ignite.internal.processors.query.calcite.exec.LogicalRelImplementor.go(LogicalRelImplementor.java:630)
at 
org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.executeQuery(ExecutionServiceImpl.java:752)
at 

[jira] [Commented] (IGNITE-14549) Calcite. ORDER BY column not from SELECT LIST

2021-04-20 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-14549:
-

looks good.

> Calcite. ORDER BY column not from SELECT LIST
> -
>
> Key: IGNITE-14549
> URL: https://issues.apache.org/jira/browse/IGNITE-14549
> Project: Ignite
>  Issue Type: Bug
>Reporter: Konstantin Orlov
>Assignee: Konstantin Orlov
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Currently queries with sorting by a column not presented in select list are 
> failed during planning.
> {{select col1 from my_table order by col2}}



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


[jira] [Commented] (IGNITE-14593) Calcite. Support not equal expression.

2021-04-20 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-14593:
-

nothing, but seems "!=" is helpful and supported by most of vendors.

> Calcite. Support not equal expression.
> --
>
> Key: IGNITE-14593
> URL: https://issues.apache.org/jira/browse/IGNITE-14593
> Project: Ignite
>  Issue Type: Improvement
>  Components: sql
>Reporter: Stanilovsky Evgeny
>Priority: Major
>  Labels: calcite
>
> Looks like it would be helpful to support "!=" syntax, i.e. :
> {code:java}
> UPDATE test SET a=7 WHERE id != 3
> {code}



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


[jira] [Commented] (IGNITE-14546) Calcite engine. MIN/MAX aggregates doesn't support string types

2021-04-20 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-14546:
-

test ok for now, @ScriptRunnerTestsEnvironment(scriptsRoot = "src/test/sql", 
regex = "/aggregate/aggregates/test_aggr_string.test")

> Calcite engine. MIN/MAX aggregates doesn't support string types
> ---
>
> Key: IGNITE-14546
> URL: https://issues.apache.org/jira/browse/IGNITE-14546
> Project: Ignite
>  Issue Type: Bug
>Reporter: Taras Ledkov
>Assignee: Stanilovsky Evgeny
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> MIN/MAX aggregates doesn't support string types.
> e.g. 
> {{CREATE TABLE TEST(val VARCHAR) }}
> {{INSERT INTO TEST VALUES ('A'), ('B'), ('C') }}
> {{ SELECT MIN(val), MAX(val) FROM TEST}}
> Test: {{src/test/sql/aggregate/aggregates/test_aggr_string.test}}



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


[jira] [Commented] (IGNITE-14131) IgniteCompute tasks with same name, running from one node and different ClassLoaders can lead to OOM. Fix problems with concurrent ignite.compute call.

2021-04-20 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-14131:
-

[~sergey-chugunov] fix ready for review, can u check it plz ?

> IgniteCompute tasks with same name, running from one node and different 
> ClassLoaders can lead to OOM. Fix problems with concurrent ignite.compute 
> call.
> ---
>
> Key: IGNITE-14131
> URL: https://issues.apache.org/jira/browse/IGNITE-14131
> Project: Ignite
>  Issue Type: Improvement
>  Components: compute
>Affects Versions: 2.10, 2.9.1
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Major
>  Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> The root cause of such a problem is growing from assumption that one node can 
> obtain only one class loader per class name. Thus multiple tasks calling with 
> different classloaders leads to huge cache grow in server side and finally 
> leads to oom with jvm metaspace. Additionally we can`t use p2p from multiple 
> threads, for example ignite instance is shared as a spring bean.
>  



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


[jira] [Created] (IGNITE-14593) Calcite. Support not equal expression.

2021-04-19 Thread Stanilovsky Evgeny (Jira)
Stanilovsky Evgeny created IGNITE-14593:
---

 Summary: Calcite. Support not equal expression.
 Key: IGNITE-14593
 URL: https://issues.apache.org/jira/browse/IGNITE-14593
 Project: Ignite
  Issue Type: Improvement
  Components: sql
Reporter: Stanilovsky Evgeny


Looks like it would be helpful to support "!=" syntax, i.e. :

{code:java}
UPDATE test SET a=7 WHERE id != 3
{code}




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


[jira] [Commented] (IGNITE-14573) DML operations failure.

2021-04-19 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-14573:
-

@ScriptRunnerTestsEnvironment(scriptsRoot = "src/test/sql", regex = 
"/update/null_update_merge.test")
works fine for now.

> DML operations failure.
> ---
>
> Key: IGNITE-14573
> URL: https://issues.apache.org/jira/browse/IGNITE-14573
> Project: Ignite
>  Issue Type: Improvement
>  Components: sql
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Major
>  Labels: calcite
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> As a result, insert with further read operations will fail.
> For example:
> {code:java}
> CREATE TABLE IF NOT EXISTS test (id INTEGER, a INTEGER);
> INSERT INTO test VALUES (1, 1), (2, 2), (3, 3), (4, NULL);"
> UPDATE test SET a=CASE WHEN id=1 THEN 7 ELSE NULL END WHERE id <= 2";
> {code}



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


[jira] [Commented] (IGNITE-14573) DML operations failure.

2021-04-19 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-14573:
-

[~korlov] check my changes plz?

> DML operations failure.
> ---
>
> Key: IGNITE-14573
> URL: https://issues.apache.org/jira/browse/IGNITE-14573
> Project: Ignite
>  Issue Type: Improvement
>  Components: sql
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Major
>  Labels: calcite
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> As a result, insert with further read operations will fail.
> For example:
> {code:java}
> CREATE TABLE IF NOT EXISTS test (id INTEGER, a INTEGER);
> INSERT INTO test VALUES (1, 1), (2, 2), (3, 3), (4, NULL);"
> UPDATE test SET a=CASE WHEN id=1 THEN 7 ELSE NULL END WHERE id <= 2";
> {code}



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


[jira] [Commented] (IGNITE-13548) Calcite integration. DROP TABLE support

2021-04-18 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-13548:
-

looks good.

> Calcite integration. DROP TABLE support
> ---
>
> Key: IGNITE-13548
> URL: https://issues.apache.org/jira/browse/IGNITE-13548
> Project: Ignite
>  Issue Type: New Feature
>  Components: sql
>Reporter: Yury Gerzhedovich
>Assignee: Konstantin Orlov
>Priority: Critical
>   Original Estimate: 40h
>  Time Spent: 10m
>  Remaining Estimate: 39h 50m
>
> We need to support DDL commands. The task about the support of DROP TABLE. 
> Potentially with syntaxis as we already have in the H2 engine.



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


[jira] [Comment Edited] (IGNITE-14573) DML operations failure.

2021-04-17 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny edited comment on IGNITE-14573 at 4/17/21, 3:51 PM:
---

This patch fixes _null_update_merge.test_ but need to decide what to do with 
"!=" syntax. 
[~korlov] [~tledkov-gridgain] can you check this fix ?
thanks !


was (Author: zstan):
This patch fixes _null_update_merge.test_ but need to decide what to do with 
"!=" syntax. 

> DML operations failure.
> ---
>
> Key: IGNITE-14573
> URL: https://issues.apache.org/jira/browse/IGNITE-14573
> Project: Ignite
>  Issue Type: Improvement
>  Components: sql
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Major
>  Labels: calcite
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> As a result, insert with further read operations will fail.
> For example:
> {code:java}
> CREATE TABLE IF NOT EXISTS test (id INTEGER, a INTEGER);
> INSERT INTO test VALUES (1, 1), (2, 2), (3, 3), (4, NULL);"
> UPDATE test SET a=CASE WHEN id=1 THEN 7 ELSE NULL END WHERE id <= 2";
> {code}



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


[jira] [Commented] (IGNITE-14573) DML operations failure.

2021-04-17 Thread Stanilovsky Evgeny (Jira)


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

Stanilovsky Evgeny commented on IGNITE-14573:
-

This patch fixes _null_update_merge.test_ but need to decide what to do with 
"!=" syntax. 

> DML operations failure.
> ---
>
> Key: IGNITE-14573
> URL: https://issues.apache.org/jira/browse/IGNITE-14573
> Project: Ignite
>  Issue Type: Improvement
>  Components: sql
>Reporter: Stanilovsky Evgeny
>Assignee: Stanilovsky Evgeny
>Priority: Major
>  Labels: calcite
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> As a result, insert with further read operations will fail.
> For example:
> {code:java}
> CREATE TABLE IF NOT EXISTS test (id INTEGER, a INTEGER);
> INSERT INTO test VALUES (1, 1), (2, 2), (3, 3), (4, NULL);"
> UPDATE test SET a=CASE WHEN id=1 THEN 7 ELSE NULL END WHERE id <= 2";
> {code}



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


  1   2   3   4   5   6   7   8   9   10   >