[jira] [Updated] (CALCITE-6395) Significant precision loss when representing REAL literals
[ https://issues.apache.org/jira/browse/CALCITE-6395?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] ASF GitHub Bot updated CALCITE-6395: Labels: pull-request-available (was: ) > Significant precision loss when representing REAL literals > -- > > Key: CALCITE-6395 > URL: https://issues.apache.org/jira/browse/CALCITE-6395 > Project: Calcite > Issue Type: Bug > Components: core >Affects Versions: 1.36.0 >Reporter: Mihai Budiu >Priority: Minor > Labels: pull-request-available > > Consider this test that could be a SqlOperatorTest: > {code:java} > f.checkScalar("CAST(CAST('36854775807.0' AS REAL) AS BIGINT)", > "36854775808", "BIGINT NOT NULL"); > {code} > The produced result is actually very far: > Expected: is "36854775808" > but: was "36854779904" > This big error comes from two reasons: > - Calcite uses BigDecimal values to represent floating point values, see > [CALCITE-2067] > - When converting a Float value to a BigDecimal in RexBuilder.clean(), the > following sequence is used: > {code:java} > new BigDecimal(((Number) o).doubleValue(), MathContext.DECIMAL32) > {code} > Using a DECIMAL32 math context leads to the precision loss. Just because a > Float uses 32 bits does not mean that the decimal should also use 32 bits. > The real fix is in the PR for [CALCITE-2067], but that hasn't been reviewed > for a long time, so I will submit a fix for the clean() method.. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Created] (CALCITE-6395) Significant precision loss when representing REAL literals
Mihai Budiu created CALCITE-6395: Summary: Significant precision loss when representing REAL literals Key: CALCITE-6395 URL: https://issues.apache.org/jira/browse/CALCITE-6395 Project: Calcite Issue Type: Bug Components: core Affects Versions: 1.36.0 Reporter: Mihai Budiu Consider this test that could be a SqlOperatorTest: {code:java} f.checkScalar("CAST(CAST('36854775807.0' AS REAL) AS BIGINT)", "36854775808", "BIGINT NOT NULL"); {code} The produced result is actually very far: Expected: is "36854775808" but: was "36854779904" This big error comes from two reasons: - Calcite uses BigDecimal values to represent floating point values, see [CALCITE-2067] - When converting a Float value to a BigDecimal in RexBuilder.clean(), the following sequence is used: {code:java} new BigDecimal(((Number) o).doubleValue(), MathContext.DECIMAL32) {code} Using a DECIMAL32 math context leads to the precision loss. Just because a Float uses 32 bits does not mean that the decimal should also use 32 bits. The real fix is in the PR for [CALCITE-2067], but that hasn't been reviewed for a long time, so I will submit a fix for the clean() method.. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Resolved] (CALCITE-5795) Type inference for VALUES with numeric values infers incorrect scale
[ https://issues.apache.org/jira/browse/CALCITE-5795?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mihai Budiu resolved CALCITE-5795. -- Resolution: Cannot Reproduce Maybe this got fixed as a side-effect of some other changes? > Type inference for VALUES with numeric values infers incorrect scale > > > Key: CALCITE-5795 > URL: https://issues.apache.org/jira/browse/CALCITE-5795 > Project: Calcite > Issue Type: Bug > Components: core >Affects Versions: 1.34.0, 1.35.0 >Reporter: Mihai Budiu >Priority: Minor > > Consider this query (using the Babel parser for the :: cast notation from > Postgres) > {code:sql} > WITH v(x) AS (VALUES(0::numeric),(4.2)) SELECT x FROM v as v1(x) > {code} > Calcite simplifies this to 0, 4, simplified at compilation time. > However, Postgres returns 0, 4.2, as expected. > It seems that this happens because the type inference for VALUES infers a > scale of 0. > Note that the following variants of the query give correct results: > {code:sql} > WITH v(x) AS (VALUES(0::numeric),(4.2::numeric)) SELECT x FROM v as v1(x) > WITH v(x) AS (VALUES(0),(4.2)) SELECT x FROM v as v1(x) > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Assigned] (CALCITE-6369) Expanding "star" gives ArrayIndexOutOfBoundsException with redundant columns and USING
[ https://issues.apache.org/jira/browse/CALCITE-6369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] James Duong reassigned CALCITE-6369: Assignee: (was: James Duong) > Expanding "star" gives ArrayIndexOutOfBoundsException with redundant columns > and USING > -- > > Key: CALCITE-6369 > URL: https://issues.apache.org/jira/browse/CALCITE-6369 > Project: Calcite > Issue Type: Bug > Components: core >Affects Versions: 1.36.0 >Reporter: Claude Brisson >Priority: Major > > The query > {code} > select r_regionkey, * from region r0 join region r1 using (r_regionkey) > {code} > produces > {code} > java.lang.ArrayIndexOutOfBoundsException: Index 14 out of bounds for length 14 > at org.apache.calcite.runtime.PairLists$ArrayImmutablePairList.get > (PairLists.java:573) > at org.apache.calcite.runtime.PairLists$ArrayImmutablePairList.get > (PairLists.java:550) > at org.apache.calcite.sql.validate.SqlValidatorImpl$Permute.permute > (SqlValidatorImpl.java:7443) > at org.apache.calcite.sql.validate.SqlValidatorImpl.expandStar > (SqlValidatorImpl.java:697) > at org.apache.calcite.sql.validate.SqlValidatorImpl.expandSelectItem > (SqlValidatorImpl.java:453) > at org.apache.calcite.sql.validate.SqlValidatorImpl.validateSelectList > (SqlValidatorImpl.java:4658) > at org.apache.calcite.sql.validate.SqlValidatorImpl.validateSelect > (SqlValidatorImpl.java:3840) > at org.apache.calcite.sql.validate.SelectNamespace.validateImpl > (SelectNamespace.java:61) > at org.apache.calcite.sql.validate.AbstractNamespace.validate > (AbstractNamespace.java:88) > at org.apache.calcite.sql.validate.SqlValidatorImpl.validateNamespace > (SqlValidatorImpl.java:1154) > at org.apache.calcite.sql.validate.SqlValidatorImpl.validateQuery > (SqlValidatorImpl.java:1125) > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Assigned] (CALCITE-6368) Inconsistent handling of COALESCE during validation
[ https://issues.apache.org/jira/browse/CALCITE-6368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] James Duong reassigned CALCITE-6368: Assignee: James Duong > Inconsistent handling of COALESCE during validation > --- > > Key: CALCITE-6368 > URL: https://issues.apache.org/jira/browse/CALCITE-6368 > Project: Calcite > Issue Type: Bug > Components: core >Affects Versions: 1.36.0 >Reporter: Claude Brisson >Assignee: James Duong >Priority: Major > > {{SqlCoalesceFunction}} has a {{rewriteCall()}} method which will replace the > call with an {{SqlCase}} call during the unconditional rewrites stage. > But expanding natural joins and {{USING}} conditions is done using > {{COALESCE}} calls in a later validation stage. > As a result, the following query: > {code} > WITH A AS (SELECT 1 AS X) > SELECT > COALESCE(A0.X, A1.X), > * > FROM A AS A0 NATURAL JOIN A AS A1 > {code} > is transformed by the validation step into: > {code} > WITH `A` AS (SELECT 1 AS `X`) > SELECT > CASE WHEN `A0`.`X` IS NOT NULL THEN `A0`.`X` ELSE `A1`.`X` END, > COALESCE(`A0`.`X`, `A1`.`X` AS `X0`) AS `X` > FROM `A` AS `A0` NATURAL INNER JOIN `A` AS `A1` > {code} > Maybe, the expanded results of {{*}} with natural joins and of {{USING}} > should pass through unconditional rewrites at creation. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Created] (CALCITE-6394) Be able to use input names instead of $i in explain
Gonzalo Ortiz created CALCITE-6394: -- Summary: Be able to use input names instead of $i in explain Key: CALCITE-6394 URL: https://issues.apache.org/jira/browse/CALCITE-6394 Project: Calcite Issue Type: Improvement Reporter: Gonzalo Ortiz As Apache Pinot committer, one of the request I've found from our users is to make explains easier to read. The main complain here is that it requires some training to be able to read them, specially because in explain names of the inputs is index based ($0, $1, etc) but the rows itself are indirectly defined by the each input. A person with enough experience may understand that the rows generated by a join is formed by appending the input of the left hand side with the input of the right hand side, but in complex queries it takes time to get use to that and to picture these rows in your mind. These complains are also based by the fact that other databases have solved this issue long ago. For example, in Postgres, given a table `a` and `two_cols` such as: {{postgres=# \d a}} {{Table "public.a"}} {{Column | Type | Collation | Nullable | Default }} {{+-+---+--+-}} {{a | integer | | | }} {{postgres=# \d two_cols}} {{ Table "public.two_cols"}} {{Column | Type | Collation | Nullable | Default }} {{+-+---+--+-}} {{a | integer | | | }} {{b | integer | | |}} A join explain shows: {{postgres=# explain select * from a join two_cols on a.a = two_cols.a;}} {{ QUERY PLAN }} {{}} {{Merge Join (cost=338.29..781.81 rows=28815 width=12)}} {{ Merge Cond: ({*}two_cols.a = a.a{*})}} {{ -> Sort (cost=158.51..164.16 rows=2260 width=8)}} {{Sort Key: *two_cols.a*}} {{-> Seq Scan on two_cols (cost=0.00..32.60 rows=2260 width=8)}} {{ -> Sort (cost=179.78..186.16 rows=2550 width=4)}} {{Sort Key: *a.a*}} {{-> Seq Scan on a (cost=0.00..35.50 rows=2550 width=4)}} {{(8 rows)}} In Postgres the explain even conserves the name of the aliases if used. To be clear, I don't know if it is possible to do this right now. I didn't find a way myself and after asking in the dev mail least I was invited to write a Jira issue to discuss about the specific requirements. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (CALCITE-6393) Byte code of SqlFunctions is invalid
[ https://issues.apache.org/jira/browse/CALCITE-6393?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Julian Hyde updated CALCITE-6393: - Affects Version/s: 1.36.0 > Byte code of SqlFunctions is invalid > > > Key: CALCITE-6393 > URL: https://issues.apache.org/jira/browse/CALCITE-6393 > Project: Calcite > Issue Type: Bug >Affects Versions: 1.36.0 >Reporter: Sergey Nuyanzin >Priority: Major > > The issue is a result of testing of Apache Calcite 1.37.0 rc 4 in this thread > [1] > There is test project andprocedure provided by [~MasseGuillaume] [2] (see > also original thread where this was first discussed [3]) > it shows that since Calcite 1.36.0 it starts failing as > {noformat} > java.lang.ArrayIndexOutOfBoundsException: Index 65536 out of bounds for > length 297 > at org.objectweb.asm.ClassReader.readLabel(ClassReader.java:2695) > at org.objectweb.asm.ClassReader.createLabel(ClassReader.java:2711) > at > org.objectweb.asm.ClassReader.readTypeAnnotations(ClassReader.java:2777) > at org.objectweb.asm.ClassReader.readCode(ClassReader.java:1929) > at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1515) > at org.objectweb.asm.ClassReader.accept(ClassReader.java:745) > {noformat} > Also since Calcite 1.27.0 it starts failing as > {noformat} > java.lang.IllegalArgumentException: Invalid end label (must be visited > first) > at > org.objectweb.asm.util.CheckMethodAdapter.checkLabel(CheckMethodAdapter.java:1453) > at > org.objectweb.asm.util.CheckMethodAdapter.visitLocalVariableAnnotation(CheckMethodAdapter.java:996) > at > org.objectweb.asm.MethodVisitor.visitLocalVariableAnnotation(MethodVisitor.java:757) > at > org.objectweb.asm.commons.MethodRemapper.visitLocalVariableAnnotation(MethodRemapper.java:257) > at org.objectweb.asm.ClassReader.readCode(ClassReader.java:2614) > at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1515) > {noformat} > [1] https://lists.apache.org/thread/n6cs1l86mt6fc5q8pcxr97czs3p6w65f > [2] https://github.com/MasseGuillaume/asm-remapper-bug > [3] https://lists.apache.org/thread/o736wz4qnr4l285bj5gv073cy0qll9t0 -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (CALCITE-6393) Byte code of SqlFunctions is invalid
[ https://issues.apache.org/jira/browse/CALCITE-6393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17842493#comment-17842493 ] Guillaume Massé commented on CALCITE-6393: -- I can work on the automated test, I just need to take some time to learn about gradle, but the idea is the following: after the jar task runs, execute the validation code with the jar path as an argument. I'm not too sure how to do this in gradle. The validation procedure is something like: Create a java.util.jar.JarFile from the jar, walk the jar file to run the validation in [https://github.com/MasseGuillaume/asm-remapper-bug/blob/852e4cd246d278db8acf5e997a54619bc4f85fc7/app/src/test/java/remapper/bug/RemapperTest.java#L60-L80] for every classfile > Byte code of SqlFunctions is invalid > > > Key: CALCITE-6393 > URL: https://issues.apache.org/jira/browse/CALCITE-6393 > Project: Calcite > Issue Type: Bug >Reporter: Sergey Nuyanzin >Priority: Major > > The issue is a result of testing of Apache Calcite 1.37.0 rc 4 in this thread > [1] > There is test project andprocedure provided by [~MasseGuillaume] [2] (see > also original thread where this was first discussed [3]) > it shows that since Calcite 1.36.0 it starts failing as > {noformat} > java.lang.ArrayIndexOutOfBoundsException: Index 65536 out of bounds for > length 297 > at org.objectweb.asm.ClassReader.readLabel(ClassReader.java:2695) > at org.objectweb.asm.ClassReader.createLabel(ClassReader.java:2711) > at > org.objectweb.asm.ClassReader.readTypeAnnotations(ClassReader.java:2777) > at org.objectweb.asm.ClassReader.readCode(ClassReader.java:1929) > at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1515) > at org.objectweb.asm.ClassReader.accept(ClassReader.java:745) > {noformat} > Also since Calcite 1.27.0 it starts failing as > {noformat} > java.lang.IllegalArgumentException: Invalid end label (must be visited > first) > at > org.objectweb.asm.util.CheckMethodAdapter.checkLabel(CheckMethodAdapter.java:1453) > at > org.objectweb.asm.util.CheckMethodAdapter.visitLocalVariableAnnotation(CheckMethodAdapter.java:996) > at > org.objectweb.asm.MethodVisitor.visitLocalVariableAnnotation(MethodVisitor.java:757) > at > org.objectweb.asm.commons.MethodRemapper.visitLocalVariableAnnotation(MethodRemapper.java:257) > at org.objectweb.asm.ClassReader.readCode(ClassReader.java:2614) > at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1515) > {noformat} > [1] https://lists.apache.org/thread/n6cs1l86mt6fc5q8pcxr97czs3p6w65f > [2] https://github.com/MasseGuillaume/asm-remapper-bug > [3] https://lists.apache.org/thread/o736wz4qnr4l285bj5gv073cy0qll9t0 -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Comment Edited] (CALCITE-6393) Byte code of SqlFunctions is invalid
[ https://issues.apache.org/jira/browse/CALCITE-6393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17842488#comment-17842488 ] Sergey Nuyanzin edited comment on CALCITE-6393 at 4/30/24 7:13 PM: --- Thanks for the info [~MasseGuillaume] btw, do you happen to have bytecode check test which I assume you usually use and which could be integrated into Calcite gradle as well? I'm asking since probably I found the root cause for all the issues here. It seems {{Checkerframework}} generates different bytecode for cases where annotations are used in second nested parameterized type. e.g. here {{@Nullable}} is used for first nested type {code:java} private static final ThreadLocal<@Nullable Map> THREAD_SEQUENCES = ThreadLocal.withInitial(HashMap::new); {code} everything is ok However with second nested level like here {code:java} private static final Function1> ARRAY_CARTESIAN_PRODUCT = lists -> { final List> enumerators = new ArrayList<>(); for (Object list : lists) { enumerators.add(Linq4j.enumerator((List) list)); } final Enumerator> product = Linq4j.product(enumerators); return new AbstractEnumerable<@Nullable Object[]>() { @Override public Enumerator<@Nullable Object[]> enumerator() { return Linq4j.transform(product, List::toArray); } }; }; {code} there is an issue. It looks like this const {{ARRAY_CARTESIAN_PRODUCT}} is not used anywhere and private. So I've just removed it and all the errors are disappeared. So it seems the {{assert}} was just a marker for accumulated error however not the root cause. At the same side it would be great to have test integrated into build system to have it always automatically checked was (Author: sergey nuyanzin): Thanks for the info [~MasseGuillaume] btw, do you happen to have bytecode check test which I assume you usually use and which could be integrated into Calcite gradle as well? I'm asking since probably I found the root cause for all the issues here. It seems {{Checkerframework}} generates different bytecode for cases where annotations are used in second nested parameterized type. e.g. here {{@Nullable}} is used for first nested type {code:java} private static final ThreadLocal<@Nullable Map> THREAD_SEQUENCES = ThreadLocal.withInitial(HashMap::new); {code} everything is ok However with second nested level like here {code:java} private static final Function1> ARRAY_CARTESIAN_PRODUCT = lists -> { final List> enumerators = new ArrayList<>(); for (Object list : lists) { enumerators.add(Linq4j.enumerator((List) list)); } final Enumerator> product = Linq4j.product(enumerators); return new AbstractEnumerable<@Nullable Object[]>() { @Override public Enumerator<@Nullable Object[]> enumerator() { return Linq4j.transform(product, List::toArray); } }; }; {code} there is an issue. It looks like this const {{ARRAY_CARTESIAN_PRODUCT}} is not used anywhere and private. So I've just removed it and all the errors are disappeared. at the same side it would be great to have test integrated into build system to have it always automatically checked > Byte code of SqlFunctions is invalid > > > Key: CALCITE-6393 > URL: https://issues.apache.org/jira/browse/CALCITE-6393 > Project: Calcite > Issue Type: Bug >Reporter: Sergey Nuyanzin >Priority: Major > > The issue is a result of testing of Apache Calcite 1.37.0 rc 4 in this thread > [1] > There is test project andprocedure provided by [~MasseGuillaume] [2] (see > also original thread where this was first discussed [3]) > it shows that since Calcite 1.36.0 it starts failing as > {noformat} > java.lang.ArrayIndexOutOfBoundsException: Index 65536 out of bounds for > length 297 > at org.objectweb.asm.ClassReader.readLabel(ClassReader.java:2695) > at org.objectweb.asm.ClassReader.createLabel(ClassReader.java:2711) > at > org.objectweb.asm.ClassReader.readTypeAnnotations(ClassReader.java:2777) > at org.objectweb.asm.ClassReader.readCode(ClassReader.java:1929) > at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1515) > at org.objectweb.asm.ClassReader.accept(ClassReader.java:745) > {noformat} > Also since Calcite 1.27.0 it starts failing as > {noformat} > java.lang.IllegalArgumentException: Invalid end label (must be visited > first) > at > org.objectweb.asm.util.CheckM
[jira] [Commented] (CALCITE-6393) Byte code of SqlFunctions is invalid
[ https://issues.apache.org/jira/browse/CALCITE-6393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17842488#comment-17842488 ] Sergey Nuyanzin commented on CALCITE-6393: -- Thanks for the info [~MasseGuillaume] btw, do you happen to have bytecode check test which I assume you usually use and which could be integrated into Calcite gradle as well? I'm asking since probably I found the root cause for all the issues here. It seems {{Checkerframework}} generates different bytecode for cases where annotations are used in second nested parameterized type. e.g. here {{@Nullable}} is used for first nested type {code:java} private static final ThreadLocal<@Nullable Map> THREAD_SEQUENCES = ThreadLocal.withInitial(HashMap::new); {code} everything is ok However with second nested level like here {code:java} private static final Function1> ARRAY_CARTESIAN_PRODUCT = lists -> { final List> enumerators = new ArrayList<>(); for (Object list : lists) { enumerators.add(Linq4j.enumerator((List) list)); } final Enumerator> product = Linq4j.product(enumerators); return new AbstractEnumerable<@Nullable Object[]>() { @Override public Enumerator<@Nullable Object[]> enumerator() { return Linq4j.transform(product, List::toArray); } }; }; {code} there is an issue. It looks like this const {{ARRAY_CARTESIAN_PRODUCT}} is not used anywhere and private. So I've just removed it and all the errors are disappeared. at the same side it would be great to have test integrated into build system to have it always automatically checked > Byte code of SqlFunctions is invalid > > > Key: CALCITE-6393 > URL: https://issues.apache.org/jira/browse/CALCITE-6393 > Project: Calcite > Issue Type: Bug >Reporter: Sergey Nuyanzin >Priority: Major > > The issue is a result of testing of Apache Calcite 1.37.0 rc 4 in this thread > [1] > There is test project andprocedure provided by [~MasseGuillaume] [2] (see > also original thread where this was first discussed [3]) > it shows that since Calcite 1.36.0 it starts failing as > {noformat} > java.lang.ArrayIndexOutOfBoundsException: Index 65536 out of bounds for > length 297 > at org.objectweb.asm.ClassReader.readLabel(ClassReader.java:2695) > at org.objectweb.asm.ClassReader.createLabel(ClassReader.java:2711) > at > org.objectweb.asm.ClassReader.readTypeAnnotations(ClassReader.java:2777) > at org.objectweb.asm.ClassReader.readCode(ClassReader.java:1929) > at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1515) > at org.objectweb.asm.ClassReader.accept(ClassReader.java:745) > {noformat} > Also since Calcite 1.27.0 it starts failing as > {noformat} > java.lang.IllegalArgumentException: Invalid end label (must be visited > first) > at > org.objectweb.asm.util.CheckMethodAdapter.checkLabel(CheckMethodAdapter.java:1453) > at > org.objectweb.asm.util.CheckMethodAdapter.visitLocalVariableAnnotation(CheckMethodAdapter.java:996) > at > org.objectweb.asm.MethodVisitor.visitLocalVariableAnnotation(MethodVisitor.java:757) > at > org.objectweb.asm.commons.MethodRemapper.visitLocalVariableAnnotation(MethodRemapper.java:257) > at org.objectweb.asm.ClassReader.readCode(ClassReader.java:2614) > at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1515) > {noformat} > [1] https://lists.apache.org/thread/n6cs1l86mt6fc5q8pcxr97czs3p6w65f > [2] https://github.com/MasseGuillaume/asm-remapper-bug > [3] https://lists.apache.org/thread/o736wz4qnr4l285bj5gv073cy0qll9t0 -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (CALCITE-6376) Selecting 6 columns with QUALIFY operation results in exception
[ https://issues.apache.org/jira/browse/CALCITE-6376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17842479#comment-17842479 ] Mihai Budiu commented on CALCITE-6376: -- I have renamed this issue, the CTE does not seem to be important. I will submit a more general fix. > Selecting 6 columns with QUALIFY operation results in exception > --- > > Key: CALCITE-6376 > URL: https://issues.apache.org/jira/browse/CALCITE-6376 > Project: Calcite > Issue Type: Bug >Affects Versions: 1.36.0 >Reporter: Austin Richardson >Assignee: ShenDa >Priority: Major > Labels: pull-request-available > > Example query: > > {code:java} > WITH MyCTE AS ( > SELECT > column1, > column2, > column3, > column4, > column5, > column6 > FROM ( > VALUES > ('value1', 10, 5.0, 'data1', 'info1', 'test1'), > ('value2', 20, 4.0, 'data2', 'info2', 'test2'), > ('value3', 30, 3.0, 'data3', 'info3', 'test3'), > ('value4', 40, 2.0, 'data4', 'info4', 'test4'), > ('value5', 50, 1.0, 'data5', 'info5', 'test5') > ) AS t(column1, column2, column3, column4, column5, column6) > ) > SELECT * > FROM MyCTE > QUALIFY RANK() OVER (ORDER BY column3) = 1{code} > > And exception snippet: > > {code:java} > Caused by: java.lang.ClassCastException: class > org.apache.calcite.rex.RexInputRef cannot be cast to class > java.lang.Comparable (org.apache.calcite.rex.RexInputRef is in unnamed module > of loader org.springframework.boot.loader.LaunchedURLClassLoader @257f30f7; > java.lang.Comparable is in module java.base of loader 'bootstrap') > at > org.apache.calcite.runtime.FlatLists$ComparableListImpl.get(FlatLists.java:1319) > at > org.apache.calcite.runtime.FlatLists$ComparableListImpl.get(FlatLists.java:1309) > at > java.base/java.util.AbstractList$Itr.next(AbstractList.java:373){code} > > Either removing one of the columns or the QUALIFY filter results in a > successful query. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (CALCITE-6376) Selecting 6 columns with QUALIFY operation results in exception
[ https://issues.apache.org/jira/browse/CALCITE-6376?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mihai Budiu updated CALCITE-6376: - Summary: Selecting 6 columns with QUALIFY operation results in exception (was: Filtering CTE of at least 6 columns with QUALIFY operation results in exception) > Selecting 6 columns with QUALIFY operation results in exception > --- > > Key: CALCITE-6376 > URL: https://issues.apache.org/jira/browse/CALCITE-6376 > Project: Calcite > Issue Type: Bug >Affects Versions: 1.36.0 >Reporter: Austin Richardson >Assignee: ShenDa >Priority: Major > Labels: pull-request-available > > Example query: > > {code:java} > WITH MyCTE AS ( > SELECT > column1, > column2, > column3, > column4, > column5, > column6 > FROM ( > VALUES > ('value1', 10, 5.0, 'data1', 'info1', 'test1'), > ('value2', 20, 4.0, 'data2', 'info2', 'test2'), > ('value3', 30, 3.0, 'data3', 'info3', 'test3'), > ('value4', 40, 2.0, 'data4', 'info4', 'test4'), > ('value5', 50, 1.0, 'data5', 'info5', 'test5') > ) AS t(column1, column2, column3, column4, column5, column6) > ) > SELECT * > FROM MyCTE > QUALIFY RANK() OVER (ORDER BY column3) = 1{code} > > And exception snippet: > > {code:java} > Caused by: java.lang.ClassCastException: class > org.apache.calcite.rex.RexInputRef cannot be cast to class > java.lang.Comparable (org.apache.calcite.rex.RexInputRef is in unnamed module > of loader org.springframework.boot.loader.LaunchedURLClassLoader @257f30f7; > java.lang.Comparable is in module java.base of loader 'bootstrap') > at > org.apache.calcite.runtime.FlatLists$ComparableListImpl.get(FlatLists.java:1319) > at > org.apache.calcite.runtime.FlatLists$ComparableListImpl.get(FlatLists.java:1309) > at > java.base/java.util.AbstractList$Itr.next(AbstractList.java:373){code} > > Either removing one of the columns or the QUALIFY filter results in a > successful query. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Comment Edited] (CALCITE-6393) Byte code of SqlFunctions is invalid
[ https://issues.apache.org/jira/browse/CALCITE-6393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17842475#comment-17842475 ] Guillaume Massé edited comment on CALCITE-6393 at 4/30/24 6:24 PM: --- We hava a fork of Calcite so we can build on jdk11 and get around the issue where SqlFunctions bytecode is invalid. (we run self-hosted Github actions) AMI image: ubuntu/images/hvm-ssd/ubuntu-lunar-23.04-amd64-server-20240117 {code:java} - name: 'Set up JDK 11' uses: actions/setup-java@v2 with: java-version: 11 distribution: 'zulu' {code} {code:java} Downloading Java 11.0.22+7 (Zulu) from https://cdn.azul.com/zulu/bin/zulu11.70.15-ca-jdk11.0.22-linux_x64.tar.gz ... {code} I'm not sure what's the root cause of all this, but it looks like bytecode generation is fragile and we should add a check after we run the jar task to make sure that every classfile is valid bytecode with asm. was (Author: masseguillaume): We hava a fork of Calcite so we can build on jdk11 and get around the issue where SqlFunctions bytecode is invalid. - name: 'Set up JDK 11' uses: actions/setup-java@v2 with: java-version: 11 distribution: 'zulu' Downloading Java 11.0.22+7 (Zulu) from https://cdn.azul.com/zulu/bin/zulu11.70.15-ca-jdk11.0.22-linux_x64.tar.gz ... I'm not sure what's the root cause of all this, but it looks like bytecode generation is fragile and we should add a check after we run the jar task to make sure that every classfile is valid bytecode with asm. > Byte code of SqlFunctions is invalid > > > Key: CALCITE-6393 > URL: https://issues.apache.org/jira/browse/CALCITE-6393 > Project: Calcite > Issue Type: Bug >Reporter: Sergey Nuyanzin >Priority: Major > > The issue is a result of testing of Apache Calcite 1.37.0 rc 4 in this thread > [1] > There is test project andprocedure provided by [~MasseGuillaume] [2] (see > also original thread where this was first discussed [3]) > it shows that since Calcite 1.36.0 it starts failing as > {noformat} > java.lang.ArrayIndexOutOfBoundsException: Index 65536 out of bounds for > length 297 > at org.objectweb.asm.ClassReader.readLabel(ClassReader.java:2695) > at org.objectweb.asm.ClassReader.createLabel(ClassReader.java:2711) > at > org.objectweb.asm.ClassReader.readTypeAnnotations(ClassReader.java:2777) > at org.objectweb.asm.ClassReader.readCode(ClassReader.java:1929) > at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1515) > at org.objectweb.asm.ClassReader.accept(ClassReader.java:745) > {noformat} > Also since Calcite 1.27.0 it starts failing as > {noformat} > java.lang.IllegalArgumentException: Invalid end label (must be visited > first) > at > org.objectweb.asm.util.CheckMethodAdapter.checkLabel(CheckMethodAdapter.java:1453) > at > org.objectweb.asm.util.CheckMethodAdapter.visitLocalVariableAnnotation(CheckMethodAdapter.java:996) > at > org.objectweb.asm.MethodVisitor.visitLocalVariableAnnotation(MethodVisitor.java:757) > at > org.objectweb.asm.commons.MethodRemapper.visitLocalVariableAnnotation(MethodRemapper.java:257) > at org.objectweb.asm.ClassReader.readCode(ClassReader.java:2614) > at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1515) > {noformat} > [1] https://lists.apache.org/thread/n6cs1l86mt6fc5q8pcxr97czs3p6w65f > [2] https://github.com/MasseGuillaume/asm-remapper-bug > [3] https://lists.apache.org/thread/o736wz4qnr4l285bj5gv073cy0qll9t0 -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (CALCITE-6393) Byte code of SqlFunctions is invalid
[ https://issues.apache.org/jira/browse/CALCITE-6393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17842475#comment-17842475 ] Guillaume Massé commented on CALCITE-6393: -- We hava a fork of Calcite so we can build on jdk11 and get around the issue where SqlFunctions bytecode is invalid. - name: 'Set up JDK 11' uses: actions/setup-java@v2 with: java-version: 11 distribution: 'zulu' Downloading Java 11.0.22+7 (Zulu) from https://cdn.azul.com/zulu/bin/zulu11.70.15-ca-jdk11.0.22-linux_x64.tar.gz ... I'm not sure what's the root cause of all this, but it looks like bytecode generation is fragile and we should add a check after we run the jar task to make sure that every classfile is valid bytecode with asm. > Byte code of SqlFunctions is invalid > > > Key: CALCITE-6393 > URL: https://issues.apache.org/jira/browse/CALCITE-6393 > Project: Calcite > Issue Type: Bug >Reporter: Sergey Nuyanzin >Priority: Major > > The issue is a result of testing of Apache Calcite 1.37.0 rc 4 in this thread > [1] > There is test project andprocedure provided by [~MasseGuillaume] [2] (see > also original thread where this was first discussed [3]) > it shows that since Calcite 1.36.0 it starts failing as > {noformat} > java.lang.ArrayIndexOutOfBoundsException: Index 65536 out of bounds for > length 297 > at org.objectweb.asm.ClassReader.readLabel(ClassReader.java:2695) > at org.objectweb.asm.ClassReader.createLabel(ClassReader.java:2711) > at > org.objectweb.asm.ClassReader.readTypeAnnotations(ClassReader.java:2777) > at org.objectweb.asm.ClassReader.readCode(ClassReader.java:1929) > at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1515) > at org.objectweb.asm.ClassReader.accept(ClassReader.java:745) > {noformat} > Also since Calcite 1.27.0 it starts failing as > {noformat} > java.lang.IllegalArgumentException: Invalid end label (must be visited > first) > at > org.objectweb.asm.util.CheckMethodAdapter.checkLabel(CheckMethodAdapter.java:1453) > at > org.objectweb.asm.util.CheckMethodAdapter.visitLocalVariableAnnotation(CheckMethodAdapter.java:996) > at > org.objectweb.asm.MethodVisitor.visitLocalVariableAnnotation(MethodVisitor.java:757) > at > org.objectweb.asm.commons.MethodRemapper.visitLocalVariableAnnotation(MethodRemapper.java:257) > at org.objectweb.asm.ClassReader.readCode(ClassReader.java:2614) > at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1515) > {noformat} > [1] https://lists.apache.org/thread/n6cs1l86mt6fc5q8pcxr97czs3p6w65f > [2] https://github.com/MasseGuillaume/asm-remapper-bug > [3] https://lists.apache.org/thread/o736wz4qnr4l285bj5gv073cy0qll9t0 -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (CALCITE-4496) Measure columns ("SELECT ... AS MEASURE")
[ https://issues.apache.org/jira/browse/CALCITE-4496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17842472#comment-17842472 ] Julian Hyde commented on CALCITE-4496: -- An update on the development of this feature. Basic measures are working, and work continues in my [4496-measure|https://github.com/julianhyde/calcite/tree/4496-measure] branch; and I have forked the [5692-at|https://github.com/julianhyde/calcite/tree/5692-at] branch to work on the AT operator (CALCITE-5692). > Measure columns ("SELECT ... AS MEASURE") > - > > Key: CALCITE-4496 > URL: https://issues.apache.org/jira/browse/CALCITE-4496 > Project: Calcite > Issue Type: Bug >Reporter: Julian Hyde >Assignee: Julian Hyde >Priority: Major > > In multi-dimensional languages such as MDX, DAX, Tableau, you can define > calculations in your models that can be re-evaluated in other dimensional > contexts. (The models are often called cubes, and the calculations are often > called measures.) > In SQL, the model is a view (or a sub-query in the FROM clause) but the > columns are just values. Suppose you have a private {{Employees}} table, a > {{Departments}} view that rolls {{Employees}} up to department level and has > an {{averageSalary}} column. Now suppose you wish to roll up > {{averageSalary}} to the region level. The values that went into > {{averageSalary}} are not available to you, either directly or indirectly, so > the best you can do is to average-the-averages. > In this proposed (and experimental) feature, you can define a special kind of > column - a measure - in the SELECT list of a view (or sub-query in a FROM > clause), and it remains a calculation. When a query uses a measure column, > the calculation is re-evaluated in the context of that query. > To some extent, this breaches the "black box" property of SQL views. > Hitherto, a SQL view can be replaced with a table that has the same contents, > and all queries that use that view will return the same results. That > property no longer holds. But the view remains a useful "hiding" abstraction, > and the rows that compose that view cannot be viewed directly. > Like dimensional models, measures in SQL would allow high-level abstractions > such as key-performance indicators (KPIs) to be shared and composed. Unlike > dimensional models, the models remain relational, namely, it is still > possible to enumerate and count the rows in a model. > Consider the following view and query that uses it: > {code:sql} > CREATE VIEW EmpSummary AS > SELECT deptno, > job, > AVG(sal) AS avg_sal, > AVG(sal) AS MEASURE avg_sal_measure, > COUNT(*) + 1 AS MEASURE count_plus_one_measure > FROM Emp > GROUP BY deptno, job; > SELECT deptno, > AVG(avg_sal) AS a1, > AGGREGATE(avg_sal_measure) AS a2, > AGGREGATE(count_plus_one_measure) AS c1 > FROM EmpSummary > GROUP BY deptno;{code} > Note that there is a special aggregate function, {{AGGREGATE}}, that rolls up > measures. Columns {{a1}} and {{a2}} will contain different values; the first > averages the averages, and the second computes the average from the raw data. > Column {{c1}} will return the number of employees in each department plus > one, not rolling up the "plus one" for each distinct job in the department. > This is just a brief sketch illustrating the purpose of measures. This > feature is experimental, the syntax will no doubt change, and much of the > semantics (for example, what expressions are valid as measures, whether > measures remain measures they appear in the SELECT clause of an enclosing > query, and what is the "context" in which a measure is evaluated) need to be > ironed out. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (CALCITE-6369) Expanding "star" gives ArrayIndexOutOfBoundsException with redundant columns and USING
[ https://issues.apache.org/jira/browse/CALCITE-6369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17842461#comment-17842461 ] James Duong commented on CALCITE-6369: -- I managed to get this working right with the emp table when the duplicated column is EMPNO and the column in USING is also EMPNO. But it fails when using multiple columns that aren't consecutive (tried using EMPNO and HIREDATE). There are multiple cases to consider: * There is one USING column, the projected column is the same column, and it is the first column in the table. * There is one USING column, the projected column is the same column, and it is not the first column in the table. * There are multiple USING columns, all columns projected are the same columns in the same order, and they are the first in the table. * There are multiple USING columns, all columns projected are the same columns in the same order, and they are not the first in the table. * There are multiple USING columns, all columns projected are in a different order, and they are the first in the table. * There are multiple USING columns, all columns projected are in a different order, and they are not the first in the table. * There are multiple USING columns, and only the first is projected, and it is the first in the table. * There are multiple USING columns, and only the first is projected, and it is not the first in the table. * There are multiple USING columns, and only the second is projected, and it is the first in the table. * There are multiple USING columns, and only the second is projected, and it is not the first in the table. > Expanding "star" gives ArrayIndexOutOfBoundsException with redundant columns > and USING > -- > > Key: CALCITE-6369 > URL: https://issues.apache.org/jira/browse/CALCITE-6369 > Project: Calcite > Issue Type: Bug > Components: core >Affects Versions: 1.36.0 >Reporter: Claude Brisson >Assignee: James Duong >Priority: Major > > The query > {code} > select r_regionkey, * from region r0 join region r1 using (r_regionkey) > {code} > produces > {code} > java.lang.ArrayIndexOutOfBoundsException: Index 14 out of bounds for length 14 > at org.apache.calcite.runtime.PairLists$ArrayImmutablePairList.get > (PairLists.java:573) > at org.apache.calcite.runtime.PairLists$ArrayImmutablePairList.get > (PairLists.java:550) > at org.apache.calcite.sql.validate.SqlValidatorImpl$Permute.permute > (SqlValidatorImpl.java:7443) > at org.apache.calcite.sql.validate.SqlValidatorImpl.expandStar > (SqlValidatorImpl.java:697) > at org.apache.calcite.sql.validate.SqlValidatorImpl.expandSelectItem > (SqlValidatorImpl.java:453) > at org.apache.calcite.sql.validate.SqlValidatorImpl.validateSelectList > (SqlValidatorImpl.java:4658) > at org.apache.calcite.sql.validate.SqlValidatorImpl.validateSelect > (SqlValidatorImpl.java:3840) > at org.apache.calcite.sql.validate.SelectNamespace.validateImpl > (SelectNamespace.java:61) > at org.apache.calcite.sql.validate.AbstractNamespace.validate > (AbstractNamespace.java:88) > at org.apache.calcite.sql.validate.SqlValidatorImpl.validateNamespace > (SqlValidatorImpl.java:1154) > at org.apache.calcite.sql.validate.SqlValidatorImpl.validateQuery > (SqlValidatorImpl.java:1125) > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Comment Edited] (CALCITE-6369) Expanding "star" gives ArrayIndexOutOfBoundsException with redundant columns and USING
[ https://issues.apache.org/jira/browse/CALCITE-6369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17842179#comment-17842179 ] James Duong edited comment on CALCITE-6369 at 4/30/24 5:43 PM: --- I've reproduced this problem using the EMP table. It's not clear why there's an ArrayIndexOutOfBoundsException while doing the permute call. What happens is that the select expansion is converting the r_regionkey column reference to a COALESCE(e0.empno, e1.empno) and gives it the alias EMPNO – I'm guessing this is because NULL won't be matched when the column is joined. If I forcibly change permute to get past the AIOB (stopping permutation at the faulty index), I get an ambiguous column reference error, which seems like a reasonable result for this query. was (Author: jduong): I've reproduced this problem. It's not clear why there's an ArrayIndexOutOfBoundsException while doing the permute call. What happens is that the select expansion is converting the r_regionkey column reference to a COALESCE(r0.r_regionky, r1.r_regionkey) and gives it the alias EMPNO – I'm guessing this is because NULL won't be matched when the column is joined. If I forcibly change permute to get past the AIOB (stopping permutation at the faulty index), I get an ambiguous column reference error, which seems like a reasonable result for this query. > Expanding "star" gives ArrayIndexOutOfBoundsException with redundant columns > and USING > -- > > Key: CALCITE-6369 > URL: https://issues.apache.org/jira/browse/CALCITE-6369 > Project: Calcite > Issue Type: Bug > Components: core >Affects Versions: 1.36.0 >Reporter: Claude Brisson >Assignee: James Duong >Priority: Major > > The query > {code} > select r_regionkey, * from region r0 join region r1 using (r_regionkey) > {code} > produces > {code} > java.lang.ArrayIndexOutOfBoundsException: Index 14 out of bounds for length 14 > at org.apache.calcite.runtime.PairLists$ArrayImmutablePairList.get > (PairLists.java:573) > at org.apache.calcite.runtime.PairLists$ArrayImmutablePairList.get > (PairLists.java:550) > at org.apache.calcite.sql.validate.SqlValidatorImpl$Permute.permute > (SqlValidatorImpl.java:7443) > at org.apache.calcite.sql.validate.SqlValidatorImpl.expandStar > (SqlValidatorImpl.java:697) > at org.apache.calcite.sql.validate.SqlValidatorImpl.expandSelectItem > (SqlValidatorImpl.java:453) > at org.apache.calcite.sql.validate.SqlValidatorImpl.validateSelectList > (SqlValidatorImpl.java:4658) > at org.apache.calcite.sql.validate.SqlValidatorImpl.validateSelect > (SqlValidatorImpl.java:3840) > at org.apache.calcite.sql.validate.SelectNamespace.validateImpl > (SelectNamespace.java:61) > at org.apache.calcite.sql.validate.AbstractNamespace.validate > (AbstractNamespace.java:88) > at org.apache.calcite.sql.validate.SqlValidatorImpl.validateNamespace > (SqlValidatorImpl.java:1154) > at org.apache.calcite.sql.validate.SqlValidatorImpl.validateQuery > (SqlValidatorImpl.java:1125) > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Comment Edited] (CALCITE-6393) Byte code of SqlFunctions is invalid
[ https://issues.apache.org/jira/browse/CALCITE-6393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17842393#comment-17842393 ] Sergey Nuyanzin edited comment on CALCITE-6393 at 4/30/24 1:56 PM: --- {quote} What other exception do you get with jdk11+? {quote} if I build it with jdk11 (in my case 11.0.20.1 (Eclipse Adoptium 11.0.20.1+1)) then i get this instead of {{ArrayIndexOutOfBoundsException}} {noformat} RemapperTest > ccalcite37WithCheck() FAILED java.lang.IllegalArgumentException: Invalid type reference sort 0x10 at org.objectweb.asm.util.CheckMethodAdapter.visitTypeAnnotation(CheckMethodAdapter.java:524) at org.objectweb.asm.MethodVisitor.visitTypeAnnotation(MethodVisitor.java:181) at org.objectweb.asm.commons.MethodRemapper.visitTypeAnnotation(MethodRemapper.java:94) at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1453) at org.objectweb.asm.ClassReader.accept(ClassReader.java:745) at org.objectweb.asm.ClassReader.accept(ClassReader.java:425) at remapper.bug.RemapperTest.runTest(RemapperTest.java:63) at remapper.bug.RemapperTest.ccalcite37WithCheck(RemapperTest.java:49) {noformat} UPD: with jdk17 (in my case 17.0.10 (Eclipse Adoptium 17.0.10+7)) the exception is going away was (Author: sergey nuyanzin): {quote} What other exception do you get with jdk11+? {quote} if I build it with jdk11 (in my case 11.0.20.1 (Eclipse Adoptium 11.0.20.1+1)) then i get this instead of {{ArrayIndexOutOfBoundsException}} {noformat} RemapperTest > ccalcite37WithCheck() FAILED java.lang.IllegalArgumentException: Invalid type reference sort 0x10 at org.objectweb.asm.util.CheckMethodAdapter.visitTypeAnnotation(CheckMethodAdapter.java:524) at org.objectweb.asm.MethodVisitor.visitTypeAnnotation(MethodVisitor.java:181) at org.objectweb.asm.commons.MethodRemapper.visitTypeAnnotation(MethodRemapper.java:94) at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1453) at org.objectweb.asm.ClassReader.accept(ClassReader.java:745) at org.objectweb.asm.ClassReader.accept(ClassReader.java:425) at remapper.bug.RemapperTest.runTest(RemapperTest.java:63) at remapper.bug.RemapperTest.ccalcite37WithCheck(RemapperTest.java:49) {noformat} > Byte code of SqlFunctions is invalid > > > Key: CALCITE-6393 > URL: https://issues.apache.org/jira/browse/CALCITE-6393 > Project: Calcite > Issue Type: Bug >Reporter: Sergey Nuyanzin >Priority: Major > > The issue is a result of testing of Apache Calcite 1.37.0 rc 4 in this thread > [1] > There is test project andprocedure provided by [~MasseGuillaume] [2] (see > also original thread where this was first discussed [3]) > it shows that since Calcite 1.36.0 it starts failing as > {noformat} > java.lang.ArrayIndexOutOfBoundsException: Index 65536 out of bounds for > length 297 > at org.objectweb.asm.ClassReader.readLabel(ClassReader.java:2695) > at org.objectweb.asm.ClassReader.createLabel(ClassReader.java:2711) > at > org.objectweb.asm.ClassReader.readTypeAnnotations(ClassReader.java:2777) > at org.objectweb.asm.ClassReader.readCode(ClassReader.java:1929) > at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1515) > at org.objectweb.asm.ClassReader.accept(ClassReader.java:745) > {noformat} > Also since Calcite 1.27.0 it starts failing as > {noformat} > java.lang.IllegalArgumentException: Invalid end label (must be visited > first) > at > org.objectweb.asm.util.CheckMethodAdapter.checkLabel(CheckMethodAdapter.java:1453) > at > org.objectweb.asm.util.CheckMethodAdapter.visitLocalVariableAnnotation(CheckMethodAdapter.java:996) > at > org.objectweb.asm.MethodVisitor.visitLocalVariableAnnotation(MethodVisitor.java:757) > at > org.objectweb.asm.commons.MethodRemapper.visitLocalVariableAnnotation(MethodRemapper.java:257) > at org.objectweb.asm.ClassReader.readCode(ClassReader.java:2614) > at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1515) > {noformat} > [1] https://lists.apache.org/thread/n6cs1l86mt6fc5q8pcxr97czs3p6w65f > [2] https://github.com/MasseGuillaume/asm-remapper-bug > [3] https://lists.apache.org/thread/o736wz4qnr4l285bj5gv073cy0qll9t0 -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (CALCITE-6393) Byte code of SqlFunctions is invalid
[ https://issues.apache.org/jira/browse/CALCITE-6393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17842393#comment-17842393 ] Sergey Nuyanzin commented on CALCITE-6393: -- {quote} What other exception do you get with jdk11+? {quote} if I build it with jdk11 (in my case 11.0.20.1 (Eclipse Adoptium 11.0.20.1+1)) then i get this instead of {{ArrayIndexOutOfBoundsException}} {noformat} RemapperTest > ccalcite37WithCheck() FAILED java.lang.IllegalArgumentException: Invalid type reference sort 0x10 at org.objectweb.asm.util.CheckMethodAdapter.visitTypeAnnotation(CheckMethodAdapter.java:524) at org.objectweb.asm.MethodVisitor.visitTypeAnnotation(MethodVisitor.java:181) at org.objectweb.asm.commons.MethodRemapper.visitTypeAnnotation(MethodRemapper.java:94) at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1453) at org.objectweb.asm.ClassReader.accept(ClassReader.java:745) at org.objectweb.asm.ClassReader.accept(ClassReader.java:425) at remapper.bug.RemapperTest.runTest(RemapperTest.java:63) at remapper.bug.RemapperTest.ccalcite37WithCheck(RemapperTest.java:49) {noformat} > Byte code of SqlFunctions is invalid > > > Key: CALCITE-6393 > URL: https://issues.apache.org/jira/browse/CALCITE-6393 > Project: Calcite > Issue Type: Bug >Reporter: Sergey Nuyanzin >Priority: Major > > The issue is a result of testing of Apache Calcite 1.37.0 rc 4 in this thread > [1] > There is test project andprocedure provided by [~MasseGuillaume] [2] (see > also original thread where this was first discussed [3]) > it shows that since Calcite 1.36.0 it starts failing as > {noformat} > java.lang.ArrayIndexOutOfBoundsException: Index 65536 out of bounds for > length 297 > at org.objectweb.asm.ClassReader.readLabel(ClassReader.java:2695) > at org.objectweb.asm.ClassReader.createLabel(ClassReader.java:2711) > at > org.objectweb.asm.ClassReader.readTypeAnnotations(ClassReader.java:2777) > at org.objectweb.asm.ClassReader.readCode(ClassReader.java:1929) > at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1515) > at org.objectweb.asm.ClassReader.accept(ClassReader.java:745) > {noformat} > Also since Calcite 1.27.0 it starts failing as > {noformat} > java.lang.IllegalArgumentException: Invalid end label (must be visited > first) > at > org.objectweb.asm.util.CheckMethodAdapter.checkLabel(CheckMethodAdapter.java:1453) > at > org.objectweb.asm.util.CheckMethodAdapter.visitLocalVariableAnnotation(CheckMethodAdapter.java:996) > at > org.objectweb.asm.MethodVisitor.visitLocalVariableAnnotation(MethodVisitor.java:757) > at > org.objectweb.asm.commons.MethodRemapper.visitLocalVariableAnnotation(MethodRemapper.java:257) > at org.objectweb.asm.ClassReader.readCode(ClassReader.java:2614) > at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1515) > {noformat} > [1] https://lists.apache.org/thread/n6cs1l86mt6fc5q8pcxr97czs3p6w65f > [2] https://github.com/MasseGuillaume/asm-remapper-bug > [3] https://lists.apache.org/thread/o736wz4qnr4l285bj5gv073cy0qll9t0 -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (CALCITE-6393) Byte code of SqlFunctions is invalid
[ https://issues.apache.org/jira/browse/CALCITE-6393?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ruben Q L updated CALCITE-6393: --- Description: The issue is a result of testing of Apache Calcite 1.37.0 rc 4 in this thread [1] There is test project andprocedure provided by [~MasseGuillaume] [2] (see also original thread where this was first discussed [3]) it shows that since Calcite 1.36.0 it starts failing as {noformat} java.lang.ArrayIndexOutOfBoundsException: Index 65536 out of bounds for length 297 at org.objectweb.asm.ClassReader.readLabel(ClassReader.java:2695) at org.objectweb.asm.ClassReader.createLabel(ClassReader.java:2711) at org.objectweb.asm.ClassReader.readTypeAnnotations(ClassReader.java:2777) at org.objectweb.asm.ClassReader.readCode(ClassReader.java:1929) at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1515) at org.objectweb.asm.ClassReader.accept(ClassReader.java:745) {noformat} Also since Calcite 1.27.0 it starts failing as {noformat} java.lang.IllegalArgumentException: Invalid end label (must be visited first) at org.objectweb.asm.util.CheckMethodAdapter.checkLabel(CheckMethodAdapter.java:1453) at org.objectweb.asm.util.CheckMethodAdapter.visitLocalVariableAnnotation(CheckMethodAdapter.java:996) at org.objectweb.asm.MethodVisitor.visitLocalVariableAnnotation(MethodVisitor.java:757) at org.objectweb.asm.commons.MethodRemapper.visitLocalVariableAnnotation(MethodRemapper.java:257) at org.objectweb.asm.ClassReader.readCode(ClassReader.java:2614) at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1515) {noformat} [1] https://lists.apache.org/thread/n6cs1l86mt6fc5q8pcxr97czs3p6w65f [2] https://github.com/MasseGuillaume/asm-remapper-bug [3] https://lists.apache.org/thread/o736wz4qnr4l285bj5gv073cy0qll9t0 was: The issue is a result of testing of Apache Calcite 1.37.0 rc 4 in this thread [1] There is test project andprocedure provided by [~MasseGuillaume] it shows that since Calcite 1.36.0 it starts failing as {noformat} java.lang.ArrayIndexOutOfBoundsException: Index 65536 out of bounds for length 297 at org.objectweb.asm.ClassReader.readLabel(ClassReader.java:2695) at org.objectweb.asm.ClassReader.createLabel(ClassReader.java:2711) at org.objectweb.asm.ClassReader.readTypeAnnotations(ClassReader.java:2777) at org.objectweb.asm.ClassReader.readCode(ClassReader.java:1929) at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1515) at org.objectweb.asm.ClassReader.accept(ClassReader.java:745) {noformat} Also since Calcite 1.27.0 it starts failing as {noformat} java.lang.IllegalArgumentException: Invalid end label (must be visited first) at org.objectweb.asm.util.CheckMethodAdapter.checkLabel(CheckMethodAdapter.java:1453) at org.objectweb.asm.util.CheckMethodAdapter.visitLocalVariableAnnotation(CheckMethodAdapter.java:996) at org.objectweb.asm.MethodVisitor.visitLocalVariableAnnotation(MethodVisitor.java:757) at org.objectweb.asm.commons.MethodRemapper.visitLocalVariableAnnotation(MethodRemapper.java:257) at org.objectweb.asm.ClassReader.readCode(ClassReader.java:2614) at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1515) {noformat} [1] https://lists.apache.org/thread/n6cs1l86mt6fc5q8pcxr97czs3p6w65f [2] https://github.com/MasseGuillaume/asm-remapper-bug > Byte code of SqlFunctions is invalid > > > Key: CALCITE-6393 > URL: https://issues.apache.org/jira/browse/CALCITE-6393 > Project: Calcite > Issue Type: Bug >Reporter: Sergey Nuyanzin >Priority: Major > > The issue is a result of testing of Apache Calcite 1.37.0 rc 4 in this thread > [1] > There is test project andprocedure provided by [~MasseGuillaume] [2] (see > also original thread where this was first discussed [3]) > it shows that since Calcite 1.36.0 it starts failing as > {noformat} > java.lang.ArrayIndexOutOfBoundsException: Index 65536 out of bounds for > length 297 > at org.objectweb.asm.ClassReader.readLabel(ClassReader.java:2695) > at org.objectweb.asm.ClassReader.createLabel(ClassReader.java:2711) > at > org.objectweb.asm.ClassReader.readTypeAnnotations(ClassReader.java:2777) > at org.objectweb.asm.ClassReader.readCode(ClassReader.java:1929) > at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1515) > at org.objectweb.asm.ClassReader.accept(ClassReader.java:745) > {noformat} > Also since Calcite 1.27.0 it starts failing as > {noformat} > java.lang.IllegalArgumentException: Invalid end label (must be
[jira] [Commented] (CALCITE-6393) Byte code of SqlFunctions is invalid
[ https://issues.apache.org/jira/browse/CALCITE-6393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17842388#comment-17842388 ] Ruben Q L commented on CALCITE-6393: Thanks [~Sergey Nuyanzin] for creating the ticket and describing the issue. {quote}... by the way ArrayIndexOutOfBoundsException is only if it was built with jdk1.8, in case it was built with other jdk e.g. 11+ then there will another Exception {quote} What other exception do you get with jdk11+? Correct me if I'm wrong [~MasseGuillaume], but the main blocking issue is #1: this problem prevents ASM from processing Calcite files correctly. Issue #2 does not happen "by default", since it requires the usage of CheckClassAdapter (but it's still a problem that needs to be investigated). > Byte code of SqlFunctions is invalid > > > Key: CALCITE-6393 > URL: https://issues.apache.org/jira/browse/CALCITE-6393 > Project: Calcite > Issue Type: Bug >Reporter: Sergey Nuyanzin >Priority: Major > > The issue is a result of testing of Apache Calcite 1.37.0 rc 4 in this thread > [1] > There is test project andprocedure provided by [~MasseGuillaume] > it shows that since Calcite 1.36.0 it starts failing as > {noformat} > java.lang.ArrayIndexOutOfBoundsException: Index 65536 out of bounds for > length 297 > at org.objectweb.asm.ClassReader.readLabel(ClassReader.java:2695) > at org.objectweb.asm.ClassReader.createLabel(ClassReader.java:2711) > at > org.objectweb.asm.ClassReader.readTypeAnnotations(ClassReader.java:2777) > at org.objectweb.asm.ClassReader.readCode(ClassReader.java:1929) > at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1515) > at org.objectweb.asm.ClassReader.accept(ClassReader.java:745) > {noformat} > Also since Calcite 1.27.0 it starts failing as > {noformat} > java.lang.IllegalArgumentException: Invalid end label (must be visited > first) > at > org.objectweb.asm.util.CheckMethodAdapter.checkLabel(CheckMethodAdapter.java:1453) > at > org.objectweb.asm.util.CheckMethodAdapter.visitLocalVariableAnnotation(CheckMethodAdapter.java:996) > at > org.objectweb.asm.MethodVisitor.visitLocalVariableAnnotation(MethodVisitor.java:757) > at > org.objectweb.asm.commons.MethodRemapper.visitLocalVariableAnnotation(MethodRemapper.java:257) > at org.objectweb.asm.ClassReader.readCode(ClassReader.java:2614) > at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1515) > {noformat} > [1] https://lists.apache.org/thread/n6cs1l86mt6fc5q8pcxr97czs3p6w65f > [2] https://github.com/MasseGuillaume/asm-remapper-bug -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (CALCITE-6393) Byte code of SqlFunctions is invalid
[ https://issues.apache.org/jira/browse/CALCITE-6393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17842378#comment-17842378 ] Sergey Nuyanzin commented on CALCITE-6393: -- It looks like there are 2 issues 1. ArrayIndexOutOfBoundsException (by the way ArrayIndexOutOfBoundsException is only if it was built with jdk1.8, in case it was built with other jdk e.g. 11+ then there will another Exception) as {{bisect}} shows it started being reproduced after this commit https://github.com/apache/calcite/commit/bcf6bd8577b25c563b1c597c70704594a18ca1a3 further analysis shows that the reason is having of {{assert}} in code in this class. Removal of asserts fixes this issue 2. {noformat}java.lang.IllegalArgumentException: Invalid end label (must be visited first){noformat} it looks like it came together with CALCITE-4199 with checkerframework currently not clear how to fix it however there is at least one WA: if we build Calcite with jdk11+ then it disappears > Byte code of SqlFunctions is invalid > > > Key: CALCITE-6393 > URL: https://issues.apache.org/jira/browse/CALCITE-6393 > Project: Calcite > Issue Type: Bug >Reporter: Sergey Nuyanzin >Priority: Major > > The issue is a result of testing of Apache Calcite 1.37.0 rc 4 in this thread > [1] > There is test project andprocedure provided by [~MasseGuillaume] > it shows that since Calcite 1.36.0 it starts failing as > {noformat} > java.lang.ArrayIndexOutOfBoundsException: Index 65536 out of bounds for > length 297 > at org.objectweb.asm.ClassReader.readLabel(ClassReader.java:2695) > at org.objectweb.asm.ClassReader.createLabel(ClassReader.java:2711) > at > org.objectweb.asm.ClassReader.readTypeAnnotations(ClassReader.java:2777) > at org.objectweb.asm.ClassReader.readCode(ClassReader.java:1929) > at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1515) > at org.objectweb.asm.ClassReader.accept(ClassReader.java:745) > {noformat} > Also since Calcite 1.27.0 it starts failing as > {noformat} > java.lang.IllegalArgumentException: Invalid end label (must be visited > first) > at > org.objectweb.asm.util.CheckMethodAdapter.checkLabel(CheckMethodAdapter.java:1453) > at > org.objectweb.asm.util.CheckMethodAdapter.visitLocalVariableAnnotation(CheckMethodAdapter.java:996) > at > org.objectweb.asm.MethodVisitor.visitLocalVariableAnnotation(MethodVisitor.java:757) > at > org.objectweb.asm.commons.MethodRemapper.visitLocalVariableAnnotation(MethodRemapper.java:257) > at org.objectweb.asm.ClassReader.readCode(ClassReader.java:2614) > at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1515) > {noformat} > [1] https://lists.apache.org/thread/n6cs1l86mt6fc5q8pcxr97czs3p6w65f > [2] https://github.com/MasseGuillaume/asm-remapper-bug -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Created] (CALCITE-6393) Byte code of SqlFunctions is invalid
Sergey Nuyanzin created CALCITE-6393: Summary: Byte code of SqlFunctions is invalid Key: CALCITE-6393 URL: https://issues.apache.org/jira/browse/CALCITE-6393 Project: Calcite Issue Type: Bug Reporter: Sergey Nuyanzin The issue is a result of testing of Apache Calcite 1.37.0 rc 4 in this thread [1] There is test project andprocedure provided by [~MasseGuillaume] it shows that since Calcite 1.36.0 it starts failing as {noformat} java.lang.ArrayIndexOutOfBoundsException: Index 65536 out of bounds for length 297 at org.objectweb.asm.ClassReader.readLabel(ClassReader.java:2695) at org.objectweb.asm.ClassReader.createLabel(ClassReader.java:2711) at org.objectweb.asm.ClassReader.readTypeAnnotations(ClassReader.java:2777) at org.objectweb.asm.ClassReader.readCode(ClassReader.java:1929) at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1515) at org.objectweb.asm.ClassReader.accept(ClassReader.java:745) {noformat} Also since Calcite 1.27.0 it starts failing as {noformat} java.lang.IllegalArgumentException: Invalid end label (must be visited first) at org.objectweb.asm.util.CheckMethodAdapter.checkLabel(CheckMethodAdapter.java:1453) at org.objectweb.asm.util.CheckMethodAdapter.visitLocalVariableAnnotation(CheckMethodAdapter.java:996) at org.objectweb.asm.MethodVisitor.visitLocalVariableAnnotation(MethodVisitor.java:757) at org.objectweb.asm.commons.MethodRemapper.visitLocalVariableAnnotation(MethodRemapper.java:257) at org.objectweb.asm.ClassReader.readCode(ClassReader.java:2614) at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1515) {noformat} [1] https://lists.apache.org/thread/n6cs1l86mt6fc5q8pcxr97czs3p6w65f [2] https://github.com/MasseGuillaume/asm-remapper-bug -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (CALCITE-6376) Filtering CTE of at least 6 columns with QUALIFY operation results in exception
[ https://issues.apache.org/jira/browse/CALCITE-6376?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] ASF GitHub Bot updated CALCITE-6376: Labels: pull-request-available (was: ) > Filtering CTE of at least 6 columns with QUALIFY operation results in > exception > --- > > Key: CALCITE-6376 > URL: https://issues.apache.org/jira/browse/CALCITE-6376 > Project: Calcite > Issue Type: Bug >Affects Versions: 1.36.0 >Reporter: Austin Richardson >Assignee: ShenDa >Priority: Major > Labels: pull-request-available > > Example query: > > {code:java} > WITH MyCTE AS ( > SELECT > column1, > column2, > column3, > column4, > column5, > column6 > FROM ( > VALUES > ('value1', 10, 5.0, 'data1', 'info1', 'test1'), > ('value2', 20, 4.0, 'data2', 'info2', 'test2'), > ('value3', 30, 3.0, 'data3', 'info3', 'test3'), > ('value4', 40, 2.0, 'data4', 'info4', 'test4'), > ('value5', 50, 1.0, 'data5', 'info5', 'test5') > ) AS t(column1, column2, column3, column4, column5, column6) > ) > SELECT * > FROM MyCTE > QUALIFY RANK() OVER (ORDER BY column3) = 1{code} > > And exception snippet: > > {code:java} > Caused by: java.lang.ClassCastException: class > org.apache.calcite.rex.RexInputRef cannot be cast to class > java.lang.Comparable (org.apache.calcite.rex.RexInputRef is in unnamed module > of loader org.springframework.boot.loader.LaunchedURLClassLoader @257f30f7; > java.lang.Comparable is in module java.base of loader 'bootstrap') > at > org.apache.calcite.runtime.FlatLists$ComparableListImpl.get(FlatLists.java:1319) > at > org.apache.calcite.runtime.FlatLists$ComparableListImpl.get(FlatLists.java:1309) > at > java.base/java.util.AbstractList$Itr.next(AbstractList.java:373){code} > > Either removing one of the columns or the QUALIFY filter results in a > successful query. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Assigned] (CALCITE-6376) Filtering CTE of at least 6 columns with QUALIFY operation results in exception
[ https://issues.apache.org/jira/browse/CALCITE-6376?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] ShenDa reassigned CALCITE-6376: --- Assignee: ShenDa > Filtering CTE of at least 6 columns with QUALIFY operation results in > exception > --- > > Key: CALCITE-6376 > URL: https://issues.apache.org/jira/browse/CALCITE-6376 > Project: Calcite > Issue Type: Bug >Affects Versions: 1.36.0 >Reporter: Austin Richardson >Assignee: ShenDa >Priority: Major > > Example query: > > {code:java} > WITH MyCTE AS ( > SELECT > column1, > column2, > column3, > column4, > column5, > column6 > FROM ( > VALUES > ('value1', 10, 5.0, 'data1', 'info1', 'test1'), > ('value2', 20, 4.0, 'data2', 'info2', 'test2'), > ('value3', 30, 3.0, 'data3', 'info3', 'test3'), > ('value4', 40, 2.0, 'data4', 'info4', 'test4'), > ('value5', 50, 1.0, 'data5', 'info5', 'test5') > ) AS t(column1, column2, column3, column4, column5, column6) > ) > SELECT * > FROM MyCTE > QUALIFY RANK() OVER (ORDER BY column3) = 1{code} > > And exception snippet: > > {code:java} > Caused by: java.lang.ClassCastException: class > org.apache.calcite.rex.RexInputRef cannot be cast to class > java.lang.Comparable (org.apache.calcite.rex.RexInputRef is in unnamed module > of loader org.springframework.boot.loader.LaunchedURLClassLoader @257f30f7; > java.lang.Comparable is in module java.base of loader 'bootstrap') > at > org.apache.calcite.runtime.FlatLists$ComparableListImpl.get(FlatLists.java:1319) > at > org.apache.calcite.runtime.FlatLists$ComparableListImpl.get(FlatLists.java:1309) > at > java.base/java.util.AbstractList$Itr.next(AbstractList.java:373){code} > > Either removing one of the columns or the QUALIFY filter results in a > successful query. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Comment Edited] (CALCITE-6369) Expanding "star" gives ArrayIndexOutOfBoundsException with redundant columns and USING
[ https://issues.apache.org/jira/browse/CALCITE-6369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17842179#comment-17842179 ] James Duong edited comment on CALCITE-6369 at 4/29/24 10:41 PM: I've reproduced this problem. It's not clear why there's an ArrayIndexOutOfBoundsException while doing the permute call. What happens is that the select expansion is converting the r_regionkey column reference to a COALESCE(r0.r_regionky, r1.r_regionkey) and gives it the alias EMPNO – I'm guessing this is because NULL won't be matched when the column is joined. If I forcibly change permute to get past the AIOB (stopping permutation at the faulty index), I get an ambiguous column reference error, which seems like a reasonable result for this query. was (Author: jduong): I've reproduced this problem. It's not clear why there's an ArrayIndexOutOfBoundsException while doing the permute call. What happens is that the select expansion is converting the r_regionkey column reference to a COALESCE(r0.r_regionky, r1.r_regionkey) – I'm guessing this is because NULL won't be matched when the column is joined. If I forcibly change permute to get past the AIOB (stopping permutation at the faulty index), I get an ambiguous column reference error, which seems like a reasonable result for this query. > Expanding "star" gives ArrayIndexOutOfBoundsException with redundant columns > and USING > -- > > Key: CALCITE-6369 > URL: https://issues.apache.org/jira/browse/CALCITE-6369 > Project: Calcite > Issue Type: Bug > Components: core >Affects Versions: 1.36.0 >Reporter: Claude Brisson >Assignee: James Duong >Priority: Major > > The query > {code} > select r_regionkey, * from region r0 join region r1 using (r_regionkey) > {code} > produces > {code} > java.lang.ArrayIndexOutOfBoundsException: Index 14 out of bounds for length 14 > at org.apache.calcite.runtime.PairLists$ArrayImmutablePairList.get > (PairLists.java:573) > at org.apache.calcite.runtime.PairLists$ArrayImmutablePairList.get > (PairLists.java:550) > at org.apache.calcite.sql.validate.SqlValidatorImpl$Permute.permute > (SqlValidatorImpl.java:7443) > at org.apache.calcite.sql.validate.SqlValidatorImpl.expandStar > (SqlValidatorImpl.java:697) > at org.apache.calcite.sql.validate.SqlValidatorImpl.expandSelectItem > (SqlValidatorImpl.java:453) > at org.apache.calcite.sql.validate.SqlValidatorImpl.validateSelectList > (SqlValidatorImpl.java:4658) > at org.apache.calcite.sql.validate.SqlValidatorImpl.validateSelect > (SqlValidatorImpl.java:3840) > at org.apache.calcite.sql.validate.SelectNamespace.validateImpl > (SelectNamespace.java:61) > at org.apache.calcite.sql.validate.AbstractNamespace.validate > (AbstractNamespace.java:88) > at org.apache.calcite.sql.validate.SqlValidatorImpl.validateNamespace > (SqlValidatorImpl.java:1154) > at org.apache.calcite.sql.validate.SqlValidatorImpl.validateQuery > (SqlValidatorImpl.java:1125) > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (CALCITE-6369) Expanding "star" gives ArrayIndexOutOfBoundsException with redundant columns and USING
[ https://issues.apache.org/jira/browse/CALCITE-6369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17842179#comment-17842179 ] James Duong commented on CALCITE-6369: -- I've reproduced this problem. It's not clear why there's an ArrayIndexOutOfBoundsException while doing the permute call. What happens is that the select expansion is converting the r_regionkey column reference to a COALESCE(r0.r_regionky, r1.r_regionkey) – I'm guessing this is because NULL won't be matched when the column is joined. If I forcibly change permute to get past the AIOB (stopping permutation at the faulty index), I get an ambiguous column reference error, which seems like a reasonable result for this query. > Expanding "star" gives ArrayIndexOutOfBoundsException with redundant columns > and USING > -- > > Key: CALCITE-6369 > URL: https://issues.apache.org/jira/browse/CALCITE-6369 > Project: Calcite > Issue Type: Bug > Components: core >Affects Versions: 1.36.0 >Reporter: Claude Brisson >Assignee: James Duong >Priority: Major > > The query > {code} > select r_regionkey, * from region r0 join region r1 using (r_regionkey) > {code} > produces > {code} > java.lang.ArrayIndexOutOfBoundsException: Index 14 out of bounds for length 14 > at org.apache.calcite.runtime.PairLists$ArrayImmutablePairList.get > (PairLists.java:573) > at org.apache.calcite.runtime.PairLists$ArrayImmutablePairList.get > (PairLists.java:550) > at org.apache.calcite.sql.validate.SqlValidatorImpl$Permute.permute > (SqlValidatorImpl.java:7443) > at org.apache.calcite.sql.validate.SqlValidatorImpl.expandStar > (SqlValidatorImpl.java:697) > at org.apache.calcite.sql.validate.SqlValidatorImpl.expandSelectItem > (SqlValidatorImpl.java:453) > at org.apache.calcite.sql.validate.SqlValidatorImpl.validateSelectList > (SqlValidatorImpl.java:4658) > at org.apache.calcite.sql.validate.SqlValidatorImpl.validateSelect > (SqlValidatorImpl.java:3840) > at org.apache.calcite.sql.validate.SelectNamespace.validateImpl > (SelectNamespace.java:61) > at org.apache.calcite.sql.validate.AbstractNamespace.validate > (AbstractNamespace.java:88) > at org.apache.calcite.sql.validate.SqlValidatorImpl.validateNamespace > (SqlValidatorImpl.java:1154) > at org.apache.calcite.sql.validate.SqlValidatorImpl.validateQuery > (SqlValidatorImpl.java:1125) > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (CALCITE-6389) RexBuilder.removeCastFromLiteral does not preserve semantics for some types of literals
[ https://issues.apache.org/jira/browse/CALCITE-6389?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mihai Budiu updated CALCITE-6389: - Summary: RexBuilder.removeCastFromLiteral does not preserve semantics for some types of literals (was: RexBuilder.removeCastFromLiteral does not preserve semantics for decimal literals) > RexBuilder.removeCastFromLiteral does not preserve semantics for some types > of literals > --- > > Key: CALCITE-6389 > URL: https://issues.apache.org/jira/browse/CALCITE-6389 > Project: Calcite > Issue Type: Bug > Components: core >Affects Versions: 1.36.0 >Reporter: Mihai Budiu >Priority: Minor > > This is a bug which I keep fixing as part of several pull requests (not yet > merged), so I have decided to make it into a separate issue. > The code in removeCastFromLiteral is supposed to remove casts which are > useless. > However, the code is too aggressive for decimal literals. In particular, this > fragment: > {code:java} > if (toType.getSqlTypeName() == SqlTypeName.DECIMAL) { > final BigDecimal decimalValue = (BigDecimal) value; > return SqlTypeUtil.isValidDecimalValue(decimalValue, toType); > } > {code} > There are at least two bugs here: > - this code removes casts from literals even if they represent types such as > interval > - this code does not check properly that the literal can be represented by > the type specified by the cast. In particular, the function > SqlTypeUtil.isValidDecimalValue does not correctly consider the scale of the > resulting type, and may return 'true' even when a number requires rescaling. > Removing casts in such a case changes the literal's value. I have submitted a > fix for this bug as part of [CALCITE-6322], but that PR hasn't been merged > yet. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Created] (CALCITE-6392) Support all PostgreSQL 14 date/time patterns for to_date/to_timestamp
Norman Jordan created CALCITE-6392: -- Summary: Support all PostgreSQL 14 date/time patterns for to_date/to_timestamp Key: CALCITE-6392 URL: https://issues.apache.org/jira/browse/CALCITE-6392 Project: Calcite Issue Type: Sub-task Reporter: Norman Jordan Assignee: Norman Jordan Many of the date/time format patterns supported by PostgreSQL 14 are not supported in Calcite. * HH * US * * S * AM * A.M. * am * a.m. * PM * P.M. * pm * p.m. * Y,YYY * YYY * Y * IYYY * IYY * IY * I * BC * B.C. * bc * b.c. * AD * A.D. * ad * a.d. * MONTH * month * MON * mon * DAY * day * Dy * dy * IDDD * ID * TZH * TZM * OF There are also template pattern modifiers that need to be supported. * FM (prefix) * TH (suffix) * th (suffix) * FX (prefix) * TM (prefix) Some format patterns in Calcite behave differently from PostgreSQL 14. * FF1 * FF2 * FF4 * FF5 * FF6 Also verify that the other existing format strings produce results that match PostgreSQL 14. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (CALCITE-6358) Support all PostgreSQL 14 date/time patterns for to_char
[ https://issues.apache.org/jira/browse/CALCITE-6358?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Norman Jordan updated CALCITE-6358: --- Summary: Support all PostgreSQL 14 date/time patterns for to_char (was: Support all PostgreSQL 14 date/time patterns) > Support all PostgreSQL 14 date/time patterns for to_char > > > Key: CALCITE-6358 > URL: https://issues.apache.org/jira/browse/CALCITE-6358 > Project: Calcite > Issue Type: Sub-task >Reporter: Norman Jordan >Assignee: Norman Jordan >Priority: Minor > Labels: pull-request-available > > Many of the date/time format patterns supported by PostgreSQL 14 are not > supported in Calcite. > * HH > * US > * > * S > * AM > * A.M. > * am > * a.m. > * PM > * P.M. > * pm > * p.m. > * Y,YYY > * YYY > * Y > * IYYY > * IYY > * IY > * I > * BC > * B.C. > * bc > * b.c. > * AD > * A.D. > * ad > * a.d. > * MONTH > * month > * MON > * mon > * DAY > * day > * Dy > * dy > * IDDD > * ID > * TZH > * TZM > * OF > There are also template pattern modifiers that need to be supported. > * FM (prefix) > * TH (suffix) > * th (suffix) > * FX (prefix) > * TM (prefix) > Some format patterns in Calcite behave differently from PostgreSQL 14. > * FF1 > * FF2 > * FF4 > * FF5 > * FF6 > Also verify that the other existing format strings produce results that match > PostgreSQL 14. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Assigned] (CALCITE-6358) Support all PostgreSQL 14 date/time patterns
[ https://issues.apache.org/jira/browse/CALCITE-6358?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Norman Jordan reassigned CALCITE-6358: -- Assignee: Norman Jordan > Support all PostgreSQL 14 date/time patterns > > > Key: CALCITE-6358 > URL: https://issues.apache.org/jira/browse/CALCITE-6358 > Project: Calcite > Issue Type: Sub-task >Reporter: Norman Jordan >Assignee: Norman Jordan >Priority: Minor > Labels: pull-request-available > > Many of the date/time format patterns supported by PostgreSQL 14 are not > supported in Calcite. > * HH > * US > * > * S > * AM > * A.M. > * am > * a.m. > * PM > * P.M. > * pm > * p.m. > * Y,YYY > * YYY > * Y > * IYYY > * IYY > * IY > * I > * BC > * B.C. > * bc > * b.c. > * AD > * A.D. > * ad > * a.d. > * MONTH > * month > * MON > * mon > * DAY > * day > * Dy > * dy > * IDDD > * ID > * TZH > * TZM > * OF > There are also template pattern modifiers that need to be supported. > * FM (prefix) > * TH (suffix) > * th (suffix) > * FX (prefix) > * TM (prefix) > Some format patterns in Calcite behave differently from PostgreSQL 14. > * FF1 > * FF2 > * FF4 > * FF5 > * FF6 > Also verify that the other existing format strings produce results that match > PostgreSQL 14. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Created] (CALCITE-6391) Apply mapping to RelCompositeTrait does not apply it to wrapped traits
James Duong created CALCITE-6391: Summary: Apply mapping to RelCompositeTrait does not apply it to wrapped traits Key: CALCITE-6391 URL: https://issues.apache.org/jira/browse/CALCITE-6391 Project: Calcite Issue Type: Bug Reporter: James Duong RelCompositeTrait wraps multiple traits. However it does not override RelTrait#apply(Mapping.TargetMapping). It uses the default implementation which makes the mapping have no effect. The correct behavior would be to propagate the apply() call to wrapped traits. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Resolved] (CALCITE-6390) ArrowAdapterTest fails on Windows
[ https://issues.apache.org/jira/browse/CALCITE-6390?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sergey Nuyanzin resolved CALCITE-6390. -- Fix Version/s: 1.37.0 Resolution: Fixed > ArrowAdapterTest fails on Windows > - > > Key: CALCITE-6390 > URL: https://issues.apache.org/jira/browse/CALCITE-6390 > Project: Calcite > Issue Type: Sub-task >Reporter: Sergey Nuyanzin >Assignee: Stamatis Zampetakis >Priority: Major > Labels: pull-request-available > Fix For: 1.37.0 > > > -That's seems somehow highlights the difference between Windows Server and > non Server- > -we have tests against Windows Server on gha (windows-latest) and they are > green- > -At the same time local tests on Windows 11 show that {{ArrowAdapterTest}} > fails like- > Based on deeper analysis Arrow module was never tested on Windows since for > Windows conf on gha it is {{--exclude-task :arrow:build}} which makes it > skipping the tests for this module > https://github.com/apache/calcite/blob/aa8d81bf1ff39e3632aeb856fc4cc247ce9727e5/.github/workflows/main.yml#L110C60-L110C88 > Any attempt to test it leads to > {noformat} > FAILURE 0.0sec, org.apache.calcite.adapter.arrow.ArrowAdapterTest > > executionError > java.io.IOException: Failed to delete temp directory > D:\MyConfiguration\cancai.cai\AppData\Local\Temp\junit5105379620525559011. > The following paths could not be deleted (see suppressed exceptions for > details): , arrow > at > org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.createIOExceptionWithAttachedFailures(TempDirectory.java:350) > at > org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.close(TempDirectory.java:251) > at > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > at > org.junit.jupiter.engine.execution.ExtensionValuesStore.lambda$closeAllStoredCloseableValues$3(ExtensionValuesStore.java:68) > at > java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) > at > java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) > at java.util.ArrayList.forEach(ArrayList.java:1259) > at java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:390) > at java.util.stream.Sink$ChainedReference.end(Sink.java:258) > at > java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:483) > at > java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) > at > java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) > at > java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) > at > java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) > at > java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) > at > org.junit.jupiter.engine.execution.ExtensionValuesStore.closeAllStoredCloseableValues(ExtensionValuesStore.java:68) > at > org.junit.jupiter.engine.descriptor.AbstractExtensionContext.close(AbstractExtensionContext.java:80) > at > org.junit.jupiter.engine.execution.JupiterEngineExecutionContext.close(JupiterEngineExecutionContext.java:53) > at > org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:222) > at > org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:57) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$cleanUp$10(NodeTestTask.java:167) > at > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.cleanUp(NodeTestTask.java:167) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:98) > at > org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:185) > at > org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.invokeAll(ForkJoinPoolHierarchicalTestExecutorService.java:129) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) > at > org.junit.platform.engine.support.hierarchical.ThrowableCol
[jira] [Commented] (CALCITE-6390) ArrowAdapterTest fails on Windows
[ https://issues.apache.org/jira/browse/CALCITE-6390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841991#comment-17841991 ] Sergey Nuyanzin commented on CALCITE-6390: -- Merged as [1506857f404037b63dfd8a11880393b767bd1544|https://github.com/apache/calcite/commit/1506857f404037b63dfd8a11880393b767bd1544] Thanks [~zabetak] for working on it Thanks [~rubenql] and [~asolimando] for the review > ArrowAdapterTest fails on Windows > - > > Key: CALCITE-6390 > URL: https://issues.apache.org/jira/browse/CALCITE-6390 > Project: Calcite > Issue Type: Sub-task >Reporter: Sergey Nuyanzin >Assignee: Stamatis Zampetakis >Priority: Major > Labels: pull-request-available > > -That's seems somehow highlights the difference between Windows Server and > non Server- > -we have tests against Windows Server on gha (windows-latest) and they are > green- > -At the same time local tests on Windows 11 show that {{ArrowAdapterTest}} > fails like- > Based on deeper analysis Arrow module was never tested on Windows since for > Windows conf on gha it is {{--exclude-task :arrow:build}} which makes it > skipping the tests for this module > https://github.com/apache/calcite/blob/aa8d81bf1ff39e3632aeb856fc4cc247ce9727e5/.github/workflows/main.yml#L110C60-L110C88 > Any attempt to test it leads to > {noformat} > FAILURE 0.0sec, org.apache.calcite.adapter.arrow.ArrowAdapterTest > > executionError > java.io.IOException: Failed to delete temp directory > D:\MyConfiguration\cancai.cai\AppData\Local\Temp\junit5105379620525559011. > The following paths could not be deleted (see suppressed exceptions for > details): , arrow > at > org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.createIOExceptionWithAttachedFailures(TempDirectory.java:350) > at > org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.close(TempDirectory.java:251) > at > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > at > org.junit.jupiter.engine.execution.ExtensionValuesStore.lambda$closeAllStoredCloseableValues$3(ExtensionValuesStore.java:68) > at > java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) > at > java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) > at java.util.ArrayList.forEach(ArrayList.java:1259) > at java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:390) > at java.util.stream.Sink$ChainedReference.end(Sink.java:258) > at > java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:483) > at > java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) > at > java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) > at > java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) > at > java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) > at > java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) > at > org.junit.jupiter.engine.execution.ExtensionValuesStore.closeAllStoredCloseableValues(ExtensionValuesStore.java:68) > at > org.junit.jupiter.engine.descriptor.AbstractExtensionContext.close(AbstractExtensionContext.java:80) > at > org.junit.jupiter.engine.execution.JupiterEngineExecutionContext.close(JupiterEngineExecutionContext.java:53) > at > org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:222) > at > org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:57) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$cleanUp$10(NodeTestTask.java:167) > at > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.cleanUp(NodeTestTask.java:167) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:98) > at > org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:185) > at > org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.invokeAll(ForkJoinPoolHierarchicalTestExecutorService.java:129) >
[jira] [Commented] (CALCITE-6390) ArrowAdapterTest fails on Windows
[ https://issues.apache.org/jira/browse/CALCITE-6390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841936#comment-17841936 ] Sergey Nuyanzin commented on CALCITE-6390: -- yep, I like the idea to skip tests on gradle level, also checked on the laptop with Windows where I have access May be it would make sense to add a note that in case of building on Windows users should keep in mind that Arrow module will be built however tests will be skipped? {quote} Would it make sense to cancel the vote for 1.37 RC3, merge the PR and create a new RC? {quote} yep, I m going to do this > ArrowAdapterTest fails on Windows > - > > Key: CALCITE-6390 > URL: https://issues.apache.org/jira/browse/CALCITE-6390 > Project: Calcite > Issue Type: Sub-task >Reporter: Sergey Nuyanzin >Assignee: Stamatis Zampetakis >Priority: Major > Labels: pull-request-available > > -That's seems somehow highlights the difference between Windows Server and > non Server- > -we have tests against Windows Server on gha (windows-latest) and they are > green- > -At the same time local tests on Windows 11 show that {{ArrowAdapterTest}} > fails like- > Based on deeper analysis Arrow module was never tested on Windows since for > Windows conf on gha it is {{--exclude-task :arrow:build}} which makes it > skipping the tests for this module > https://github.com/apache/calcite/blob/aa8d81bf1ff39e3632aeb856fc4cc247ce9727e5/.github/workflows/main.yml#L110C60-L110C88 > Any attempt to test it leads to > {noformat} > FAILURE 0.0sec, org.apache.calcite.adapter.arrow.ArrowAdapterTest > > executionError > java.io.IOException: Failed to delete temp directory > D:\MyConfiguration\cancai.cai\AppData\Local\Temp\junit5105379620525559011. > The following paths could not be deleted (see suppressed exceptions for > details): , arrow > at > org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.createIOExceptionWithAttachedFailures(TempDirectory.java:350) > at > org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.close(TempDirectory.java:251) > at > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > at > org.junit.jupiter.engine.execution.ExtensionValuesStore.lambda$closeAllStoredCloseableValues$3(ExtensionValuesStore.java:68) > at > java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) > at > java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) > at java.util.ArrayList.forEach(ArrayList.java:1259) > at java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:390) > at java.util.stream.Sink$ChainedReference.end(Sink.java:258) > at > java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:483) > at > java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) > at > java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) > at > java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) > at > java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) > at > java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) > at > org.junit.jupiter.engine.execution.ExtensionValuesStore.closeAllStoredCloseableValues(ExtensionValuesStore.java:68) > at > org.junit.jupiter.engine.descriptor.AbstractExtensionContext.close(AbstractExtensionContext.java:80) > at > org.junit.jupiter.engine.execution.JupiterEngineExecutionContext.close(JupiterEngineExecutionContext.java:53) > at > org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:222) > at > org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:57) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$cleanUp$10(NodeTestTask.java:167) > at > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.cleanUp(NodeTestTask.java:167) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:98) > at > org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:185) > at > org.junit.platform.engine.support.hi
[jira] [Commented] (CALCITE-6390) ArrowAdapterTest fails on Windows
[ https://issues.apache.org/jira/browse/CALCITE-6390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841931#comment-17841931 ] Stamatis Zampetakis commented on CALCITE-6390: -- Skipping the entire project or build when running on Windows may have undesired side-effects. For instance, if the RM is running on Windows we may end up with a release that does not contain the Arrow adapter and it may even pass unnoticed. If the tests are the only problem then skipping only those makes sense. > ArrowAdapterTest fails on Windows > - > > Key: CALCITE-6390 > URL: https://issues.apache.org/jira/browse/CALCITE-6390 > Project: Calcite > Issue Type: Sub-task >Reporter: Sergey Nuyanzin >Assignee: Stamatis Zampetakis >Priority: Major > Labels: pull-request-available > > -That's seems somehow highlights the difference between Windows Server and > non Server- > -we have tests against Windows Server on gha (windows-latest) and they are > green- > -At the same time local tests on Windows 11 show that {{ArrowAdapterTest}} > fails like- > Based on deeper analysis Arrow module was never tested on Windows since for > Windows conf on gha it is {{--exclude-task :arrow:build}} which makes it > skipping the tests for this module > https://github.com/apache/calcite/blob/aa8d81bf1ff39e3632aeb856fc4cc247ce9727e5/.github/workflows/main.yml#L110C60-L110C88 > Any attempt to test it leads to > {noformat} > FAILURE 0.0sec, org.apache.calcite.adapter.arrow.ArrowAdapterTest > > executionError > java.io.IOException: Failed to delete temp directory > D:\MyConfiguration\cancai.cai\AppData\Local\Temp\junit5105379620525559011. > The following paths could not be deleted (see suppressed exceptions for > details): , arrow > at > org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.createIOExceptionWithAttachedFailures(TempDirectory.java:350) > at > org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.close(TempDirectory.java:251) > at > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > at > org.junit.jupiter.engine.execution.ExtensionValuesStore.lambda$closeAllStoredCloseableValues$3(ExtensionValuesStore.java:68) > at > java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) > at > java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) > at java.util.ArrayList.forEach(ArrayList.java:1259) > at java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:390) > at java.util.stream.Sink$ChainedReference.end(Sink.java:258) > at > java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:483) > at > java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) > at > java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) > at > java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) > at > java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) > at > java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) > at > org.junit.jupiter.engine.execution.ExtensionValuesStore.closeAllStoredCloseableValues(ExtensionValuesStore.java:68) > at > org.junit.jupiter.engine.descriptor.AbstractExtensionContext.close(AbstractExtensionContext.java:80) > at > org.junit.jupiter.engine.execution.JupiterEngineExecutionContext.close(JupiterEngineExecutionContext.java:53) > at > org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:222) > at > org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:57) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$cleanUp$10(NodeTestTask.java:167) > at > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.cleanUp(NodeTestTask.java:167) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:98) > at > org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:185) > at > org.junit.platform.engine.support.hierar
[jira] [Commented] (CALCITE-6390) ArrowAdapterTest fails on Windows
[ https://issues.apache.org/jira/browse/CALCITE-6390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841930#comment-17841930 ] Caican Cai commented on CALCITE-6390: - Do we need to document this > ArrowAdapterTest fails on Windows > - > > Key: CALCITE-6390 > URL: https://issues.apache.org/jira/browse/CALCITE-6390 > Project: Calcite > Issue Type: Sub-task >Reporter: Sergey Nuyanzin >Assignee: Stamatis Zampetakis >Priority: Major > Labels: pull-request-available > > -That's seems somehow highlights the difference between Windows Server and > non Server- > -we have tests against Windows Server on gha (windows-latest) and they are > green- > -At the same time local tests on Windows 11 show that {{ArrowAdapterTest}} > fails like- > Based on deeper analysis Arrow module was never tested on Windows since for > Windows conf on gha it is {{--exclude-task :arrow:build}} which makes it > skipping the tests for this module > https://github.com/apache/calcite/blob/aa8d81bf1ff39e3632aeb856fc4cc247ce9727e5/.github/workflows/main.yml#L110C60-L110C88 > Any attempt to test it leads to > {noformat} > FAILURE 0.0sec, org.apache.calcite.adapter.arrow.ArrowAdapterTest > > executionError > java.io.IOException: Failed to delete temp directory > D:\MyConfiguration\cancai.cai\AppData\Local\Temp\junit5105379620525559011. > The following paths could not be deleted (see suppressed exceptions for > details): , arrow > at > org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.createIOExceptionWithAttachedFailures(TempDirectory.java:350) > at > org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.close(TempDirectory.java:251) > at > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > at > org.junit.jupiter.engine.execution.ExtensionValuesStore.lambda$closeAllStoredCloseableValues$3(ExtensionValuesStore.java:68) > at > java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) > at > java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) > at java.util.ArrayList.forEach(ArrayList.java:1259) > at java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:390) > at java.util.stream.Sink$ChainedReference.end(Sink.java:258) > at > java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:483) > at > java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) > at > java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) > at > java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) > at > java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) > at > java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) > at > org.junit.jupiter.engine.execution.ExtensionValuesStore.closeAllStoredCloseableValues(ExtensionValuesStore.java:68) > at > org.junit.jupiter.engine.descriptor.AbstractExtensionContext.close(AbstractExtensionContext.java:80) > at > org.junit.jupiter.engine.execution.JupiterEngineExecutionContext.close(JupiterEngineExecutionContext.java:53) > at > org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:222) > at > org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:57) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$cleanUp$10(NodeTestTask.java:167) > at > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.cleanUp(NodeTestTask.java:167) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:98) > at > org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:185) > at > org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.invokeAll(ForkJoinPoolHierarchicalTestExecutorService.java:129) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) > at > org.junit.platform.engine.support.hierarchical.ThrowableCollector
[jira] [Commented] (CALCITE-6390) ArrowAdapterTest fails on Windows
[ https://issues.apache.org/jira/browse/CALCITE-6390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841929#comment-17841929 ] Stamatis Zampetakis commented on CALCITE-6390: -- Actually Ruben's idea of just disabling the Arrow tests on Windows is less brutal so I updated the PR accordingly to see if everything else works as expected. > ArrowAdapterTest fails on Windows > - > > Key: CALCITE-6390 > URL: https://issues.apache.org/jira/browse/CALCITE-6390 > Project: Calcite > Issue Type: Sub-task >Reporter: Sergey Nuyanzin >Assignee: Stamatis Zampetakis >Priority: Major > Labels: pull-request-available > > -That's seems somehow highlights the difference between Windows Server and > non Server- > -we have tests against Windows Server on gha (windows-latest) and they are > green- > -At the same time local tests on Windows 11 show that {{ArrowAdapterTest}} > fails like- > Based on deeper analysis Arrow module was never tested on Windows since for > Windows conf on gha it is {{--exclude-task :arrow:build}} which makes it > skipping the tests for this module > https://github.com/apache/calcite/blob/aa8d81bf1ff39e3632aeb856fc4cc247ce9727e5/.github/workflows/main.yml#L110C60-L110C88 > Any attempt to test it leads to > {noformat} > FAILURE 0.0sec, org.apache.calcite.adapter.arrow.ArrowAdapterTest > > executionError > java.io.IOException: Failed to delete temp directory > D:\MyConfiguration\cancai.cai\AppData\Local\Temp\junit5105379620525559011. > The following paths could not be deleted (see suppressed exceptions for > details): , arrow > at > org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.createIOExceptionWithAttachedFailures(TempDirectory.java:350) > at > org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.close(TempDirectory.java:251) > at > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > at > org.junit.jupiter.engine.execution.ExtensionValuesStore.lambda$closeAllStoredCloseableValues$3(ExtensionValuesStore.java:68) > at > java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) > at > java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) > at java.util.ArrayList.forEach(ArrayList.java:1259) > at java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:390) > at java.util.stream.Sink$ChainedReference.end(Sink.java:258) > at > java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:483) > at > java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) > at > java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) > at > java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) > at > java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) > at > java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) > at > org.junit.jupiter.engine.execution.ExtensionValuesStore.closeAllStoredCloseableValues(ExtensionValuesStore.java:68) > at > org.junit.jupiter.engine.descriptor.AbstractExtensionContext.close(AbstractExtensionContext.java:80) > at > org.junit.jupiter.engine.execution.JupiterEngineExecutionContext.close(JupiterEngineExecutionContext.java:53) > at > org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:222) > at > org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:57) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$cleanUp$10(NodeTestTask.java:167) > at > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.cleanUp(NodeTestTask.java:167) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:98) > at > org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:185) > at > org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.invokeAll(ForkJoinPoolHierarchicalTestExecutorService.java:129) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.jav
[jira] [Commented] (CALCITE-6390) ArrowAdapterTest fails on Windows
[ https://issues.apache.org/jira/browse/CALCITE-6390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841925#comment-17841925 ] Ruben Q L commented on CALCITE-6390: +1 on [~zabetak]'s idea. Would it make sense to cancel the vote for 1.37 RC3, merge the PR and create a new RC? > ArrowAdapterTest fails on Windows > - > > Key: CALCITE-6390 > URL: https://issues.apache.org/jira/browse/CALCITE-6390 > Project: Calcite > Issue Type: Sub-task >Reporter: Sergey Nuyanzin >Assignee: Stamatis Zampetakis >Priority: Major > Labels: pull-request-available > > -That's seems somehow highlights the difference between Windows Server and > non Server- > -we have tests against Windows Server on gha (windows-latest) and they are > green- > -At the same time local tests on Windows 11 show that {{ArrowAdapterTest}} > fails like- > Based on deeper analysis Arrow module was never tested on Windows since for > Windows conf on gha it is {{--exclude-task :arrow:build}} which makes it > skipping the tests for this module > https://github.com/apache/calcite/blob/aa8d81bf1ff39e3632aeb856fc4cc247ce9727e5/.github/workflows/main.yml#L110C60-L110C88 > Any attempt to test it leads to > {noformat} > FAILURE 0.0sec, org.apache.calcite.adapter.arrow.ArrowAdapterTest > > executionError > java.io.IOException: Failed to delete temp directory > D:\MyConfiguration\cancai.cai\AppData\Local\Temp\junit5105379620525559011. > The following paths could not be deleted (see suppressed exceptions for > details): , arrow > at > org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.createIOExceptionWithAttachedFailures(TempDirectory.java:350) > at > org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.close(TempDirectory.java:251) > at > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > at > org.junit.jupiter.engine.execution.ExtensionValuesStore.lambda$closeAllStoredCloseableValues$3(ExtensionValuesStore.java:68) > at > java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) > at > java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) > at java.util.ArrayList.forEach(ArrayList.java:1259) > at java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:390) > at java.util.stream.Sink$ChainedReference.end(Sink.java:258) > at > java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:483) > at > java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) > at > java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) > at > java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) > at > java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) > at > java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) > at > org.junit.jupiter.engine.execution.ExtensionValuesStore.closeAllStoredCloseableValues(ExtensionValuesStore.java:68) > at > org.junit.jupiter.engine.descriptor.AbstractExtensionContext.close(AbstractExtensionContext.java:80) > at > org.junit.jupiter.engine.execution.JupiterEngineExecutionContext.close(JupiterEngineExecutionContext.java:53) > at > org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:222) > at > org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:57) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$cleanUp$10(NodeTestTask.java:167) > at > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.cleanUp(NodeTestTask.java:167) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:98) > at > org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:185) > at > org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.invokeAll(ForkJoinPoolHierarchicalTestExecutorService.java:129) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:15
[jira] [Commented] (CALCITE-6390) ArrowAdapterTest fails on Windows
[ https://issues.apache.org/jira/browse/CALCITE-6390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841922#comment-17841922 ] Stamatis Zampetakis commented on CALCITE-6390: -- Given that the Arrow build was never tested on Windows I would be inclined to skip the project automatically (and transparently for the end users) when running on Windows instead of adding OS specific instructions in the documentation. I raised a PR with this approach. WDYT? > ArrowAdapterTest fails on Windows > - > > Key: CALCITE-6390 > URL: https://issues.apache.org/jira/browse/CALCITE-6390 > Project: Calcite > Issue Type: Sub-task >Reporter: Sergey Nuyanzin >Assignee: Stamatis Zampetakis >Priority: Major > Labels: pull-request-available > > -That's seems somehow highlights the difference between Windows Server and > non Server- > -we have tests against Windows Server on gha (windows-latest) and they are > green- > -At the same time local tests on Windows 11 show that {{ArrowAdapterTest}} > fails like- > Based on deeper analysis Arrow module was never tested on Windows since for > Windows conf on gha it is {{--exclude-task :arrow:build}} which makes it > skipping the tests for this module > https://github.com/apache/calcite/blob/aa8d81bf1ff39e3632aeb856fc4cc247ce9727e5/.github/workflows/main.yml#L110C60-L110C88 > Any attempt to test it leads to > {noformat} > FAILURE 0.0sec, org.apache.calcite.adapter.arrow.ArrowAdapterTest > > executionError > java.io.IOException: Failed to delete temp directory > D:\MyConfiguration\cancai.cai\AppData\Local\Temp\junit5105379620525559011. > The following paths could not be deleted (see suppressed exceptions for > details): , arrow > at > org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.createIOExceptionWithAttachedFailures(TempDirectory.java:350) > at > org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.close(TempDirectory.java:251) > at > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > at > org.junit.jupiter.engine.execution.ExtensionValuesStore.lambda$closeAllStoredCloseableValues$3(ExtensionValuesStore.java:68) > at > java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) > at > java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) > at java.util.ArrayList.forEach(ArrayList.java:1259) > at java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:390) > at java.util.stream.Sink$ChainedReference.end(Sink.java:258) > at > java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:483) > at > java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) > at > java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) > at > java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) > at > java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) > at > java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) > at > org.junit.jupiter.engine.execution.ExtensionValuesStore.closeAllStoredCloseableValues(ExtensionValuesStore.java:68) > at > org.junit.jupiter.engine.descriptor.AbstractExtensionContext.close(AbstractExtensionContext.java:80) > at > org.junit.jupiter.engine.execution.JupiterEngineExecutionContext.close(JupiterEngineExecutionContext.java:53) > at > org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:222) > at > org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:57) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$cleanUp$10(NodeTestTask.java:167) > at > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.cleanUp(NodeTestTask.java:167) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:98) > at > org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:185) > at > org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.invokeAll(ForkJoinPoolHierarchicalTestExecutorService.java:129) >
[jira] [Updated] (CALCITE-6390) ArrowAdapterTest fails on Windows
[ https://issues.apache.org/jira/browse/CALCITE-6390?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] ASF GitHub Bot updated CALCITE-6390: Labels: pull-request-available (was: ) > ArrowAdapterTest fails on Windows > - > > Key: CALCITE-6390 > URL: https://issues.apache.org/jira/browse/CALCITE-6390 > Project: Calcite > Issue Type: Sub-task >Reporter: Sergey Nuyanzin >Assignee: Stamatis Zampetakis >Priority: Major > Labels: pull-request-available > > -That's seems somehow highlights the difference between Windows Server and > non Server- > -we have tests against Windows Server on gha (windows-latest) and they are > green- > -At the same time local tests on Windows 11 show that {{ArrowAdapterTest}} > fails like- > Based on deeper analysis Arrow module was never tested on Windows since for > Windows conf on gha it is {{--exclude-task :arrow:build}} which makes it > skipping the tests for this module > https://github.com/apache/calcite/blob/aa8d81bf1ff39e3632aeb856fc4cc247ce9727e5/.github/workflows/main.yml#L110C60-L110C88 > Any attempt to test it leads to > {noformat} > FAILURE 0.0sec, org.apache.calcite.adapter.arrow.ArrowAdapterTest > > executionError > java.io.IOException: Failed to delete temp directory > D:\MyConfiguration\cancai.cai\AppData\Local\Temp\junit5105379620525559011. > The following paths could not be deleted (see suppressed exceptions for > details): , arrow > at > org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.createIOExceptionWithAttachedFailures(TempDirectory.java:350) > at > org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.close(TempDirectory.java:251) > at > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > at > org.junit.jupiter.engine.execution.ExtensionValuesStore.lambda$closeAllStoredCloseableValues$3(ExtensionValuesStore.java:68) > at > java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) > at > java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) > at java.util.ArrayList.forEach(ArrayList.java:1259) > at java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:390) > at java.util.stream.Sink$ChainedReference.end(Sink.java:258) > at > java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:483) > at > java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) > at > java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) > at > java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) > at > java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) > at > java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) > at > org.junit.jupiter.engine.execution.ExtensionValuesStore.closeAllStoredCloseableValues(ExtensionValuesStore.java:68) > at > org.junit.jupiter.engine.descriptor.AbstractExtensionContext.close(AbstractExtensionContext.java:80) > at > org.junit.jupiter.engine.execution.JupiterEngineExecutionContext.close(JupiterEngineExecutionContext.java:53) > at > org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:222) > at > org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:57) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$cleanUp$10(NodeTestTask.java:167) > at > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.cleanUp(NodeTestTask.java:167) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:98) > at > org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:185) > at > org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.invokeAll(ForkJoinPoolHierarchicalTestExecutorService.java:129) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) > at > org.junit.platform.engine.support.hierarchical.ThrowableCollector
[jira] [Assigned] (CALCITE-6390) ArrowAdapterTest fails on Windows
[ https://issues.apache.org/jira/browse/CALCITE-6390?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stamatis Zampetakis reassigned CALCITE-6390: Assignee: Stamatis Zampetakis > ArrowAdapterTest fails on Windows > - > > Key: CALCITE-6390 > URL: https://issues.apache.org/jira/browse/CALCITE-6390 > Project: Calcite > Issue Type: Sub-task >Reporter: Sergey Nuyanzin >Assignee: Stamatis Zampetakis >Priority: Major > > -That's seems somehow highlights the difference between Windows Server and > non Server- > -we have tests against Windows Server on gha (windows-latest) and they are > green- > -At the same time local tests on Windows 11 show that {{ArrowAdapterTest}} > fails like- > Based on deeper analysis Arrow module was never tested on Windows since for > Windows conf on gha it is {{--exclude-task :arrow:build}} which makes it > skipping the tests for this module > https://github.com/apache/calcite/blob/aa8d81bf1ff39e3632aeb856fc4cc247ce9727e5/.github/workflows/main.yml#L110C60-L110C88 > Any attempt to test it leads to > {noformat} > FAILURE 0.0sec, org.apache.calcite.adapter.arrow.ArrowAdapterTest > > executionError > java.io.IOException: Failed to delete temp directory > D:\MyConfiguration\cancai.cai\AppData\Local\Temp\junit5105379620525559011. > The following paths could not be deleted (see suppressed exceptions for > details): , arrow > at > org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.createIOExceptionWithAttachedFailures(TempDirectory.java:350) > at > org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.close(TempDirectory.java:251) > at > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > at > org.junit.jupiter.engine.execution.ExtensionValuesStore.lambda$closeAllStoredCloseableValues$3(ExtensionValuesStore.java:68) > at > java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) > at > java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) > at java.util.ArrayList.forEach(ArrayList.java:1259) > at java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:390) > at java.util.stream.Sink$ChainedReference.end(Sink.java:258) > at > java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:483) > at > java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) > at > java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) > at > java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) > at > java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) > at > java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) > at > org.junit.jupiter.engine.execution.ExtensionValuesStore.closeAllStoredCloseableValues(ExtensionValuesStore.java:68) > at > org.junit.jupiter.engine.descriptor.AbstractExtensionContext.close(AbstractExtensionContext.java:80) > at > org.junit.jupiter.engine.execution.JupiterEngineExecutionContext.close(JupiterEngineExecutionContext.java:53) > at > org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:222) > at > org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:57) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$cleanUp$10(NodeTestTask.java:167) > at > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.cleanUp(NodeTestTask.java:167) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:98) > at > org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:185) > at > org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.invokeAll(ForkJoinPoolHierarchicalTestExecutorService.java:129) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) > at > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > at > org.junit.platform.engine.support.hierarchical.No
[jira] [Commented] (CALCITE-6390) ArrowAdapterTest fails on Windows
[ https://issues.apache.org/jira/browse/CALCITE-6390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841912#comment-17841912 ] Ruben Q L commented on CALCITE-6390: [~Sergey Nuyanzin] thanks for investigating this. Wouldn't it be more precise to just exclude {{arrow:test}} ? > ArrowAdapterTest fails on Windows > - > > Key: CALCITE-6390 > URL: https://issues.apache.org/jira/browse/CALCITE-6390 > Project: Calcite > Issue Type: Sub-task >Reporter: Sergey Nuyanzin >Priority: Major > > -That's seems somehow highlights the difference between Windows Server and > non Server- > -we have tests against Windows Server on gha (windows-latest) and they are > green- > -At the same time local tests on Windows 11 show that {{ArrowAdapterTest}} > fails like- > Based on deeper analysis Arrow module was never tested on Windows since for > Windows conf on gha it is {{--exclude-task :arrow:build}} which makes it > skipping the tests for this module > https://github.com/apache/calcite/blob/aa8d81bf1ff39e3632aeb856fc4cc247ce9727e5/.github/workflows/main.yml#L110C60-L110C88 > Any attempt to test it leads to > {noformat} > FAILURE 0.0sec, org.apache.calcite.adapter.arrow.ArrowAdapterTest > > executionError > java.io.IOException: Failed to delete temp directory > D:\MyConfiguration\cancai.cai\AppData\Local\Temp\junit5105379620525559011. > The following paths could not be deleted (see suppressed exceptions for > details): , arrow > at > org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.createIOExceptionWithAttachedFailures(TempDirectory.java:350) > at > org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.close(TempDirectory.java:251) > at > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > at > org.junit.jupiter.engine.execution.ExtensionValuesStore.lambda$closeAllStoredCloseableValues$3(ExtensionValuesStore.java:68) > at > java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) > at > java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) > at java.util.ArrayList.forEach(ArrayList.java:1259) > at java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:390) > at java.util.stream.Sink$ChainedReference.end(Sink.java:258) > at > java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:483) > at > java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) > at > java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) > at > java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) > at > java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) > at > java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) > at > org.junit.jupiter.engine.execution.ExtensionValuesStore.closeAllStoredCloseableValues(ExtensionValuesStore.java:68) > at > org.junit.jupiter.engine.descriptor.AbstractExtensionContext.close(AbstractExtensionContext.java:80) > at > org.junit.jupiter.engine.execution.JupiterEngineExecutionContext.close(JupiterEngineExecutionContext.java:53) > at > org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:222) > at > org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:57) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$cleanUp$10(NodeTestTask.java:167) > at > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.cleanUp(NodeTestTask.java:167) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:98) > at > org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:185) > at > org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.invokeAll(ForkJoinPoolHierarchicalTestExecutorService.java:129) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) > at > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execu
[jira] [Commented] (CALCITE-6300) Function MAP_VALUES/MAP_KEYS gives exception when mapVauleType and mapKeyType not equals map Biggest mapKeytype or mapValueType
[ https://issues.apache.org/jira/browse/CALCITE-6300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841666#comment-17841666 ] Julian Hyde commented on CALCITE-6300: -- Maybe it could get away with it, but it probably shouldn’t. SqlCallBinding has a “functional programming” vibe and other code might be surprised at side effects. if code wants to know the most general key and value types - that is, the effective type of the arguments in a particular call - the best thing is to ask for the deduced return type, which will be a map type, and use its key or value types. > Function MAP_VALUES/MAP_KEYS gives exception when mapVauleType and mapKeyType > not equals map Biggest mapKeytype or mapValueType > > > Key: CALCITE-6300 > URL: https://issues.apache.org/jira/browse/CALCITE-6300 > Project: Calcite > Issue Type: Bug > Components: core >Affects Versions: 1.36.0 >Reporter: Caican Cai >Assignee: Caican Cai >Priority: Major > Labels: pull-request-available > Fix For: 1.37.0 > > > If we run the expression below in calcite, it will cause exception: > {code:java} > map_values(map('foo', cast (2 as tinyint), 'bar', 2)) {code} > {code:java} > java.lang.ClassCastException: java.lang.Byte cannot be cast to > java.lang.Integer > at > org.apache.calcite.avatica.util.AbstractCursor$IntAccessor.getInt(AbstractCursor.java:522) >at > org.apache.calcite.avatica.util.AbstractCursor$ArrayAccessor.convertValue(AbstractCursor.java:1396) > at > org.apache.calcite.avatica.util.AbstractCursor$ArrayAccessor.getObject(AbstractCursor.java:1377) > at > org.apache.calcite.avatica.util.AbstractCursor$ArrayAccessor.getArray(AbstractCursor.java:1432) > at > org.apache.calcite.avatica.util.AbstractCursor$ArrayAccessor.getString(AbstractCursor.java:1444) > at > org.apache.calcite.avatica.AvaticaResultSet.getString(AvaticaResultSet.java:241) > at org.apache.calcite.util.JdbcTypeImpl$10.get(JdbcTypeImpl.java:112) > at org.apache.calcite.util.JdbcTypeImpl$10.get(JdbcTypeImpl.java:109) at > org.apache.calcite.sql.test.ResultCheckers.compareResultSetWithMatcher(ResultCheckers.java:248) > at > org.apache.calcite.sql.test.ResultCheckers$MatcherResultChecker.checkResult(ResultCheckers.java:321) > at > org.apache.calcite.test.SqlOperatorTest$TesterImpl.check(SqlOperatorTest.java:14300) > at org.apache.calcite.sql.test.SqlTester.check(SqlTester.java:160) at > org.apache.calcite.test.SqlOperatorFixtureImpl.lambda$checkScalar$2(SqlOperatorFixtureImpl.java:226) > at > org.apache.calcite.sql.test.AbstractSqlTester.forEachQuery(AbstractSqlTester.java:450) >at > org.apache.calcite.test.SqlOperatorFixtureImpl.checkScalar(SqlOperatorFixtureImpl.java:225) > at > org.apache.calcite.sql.test.SqlOperatorFixture.checkScalar(SqlOperatorFixture.java:229) > at > org.apache.calcite.test.SqlOperatorTest.testMapValuesFunc(SqlOperatorTest.java:7276) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) >at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) at > org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727) >at > org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60) > at > org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131) > at > org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156) > at > org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147) >at > org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86) > at > org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103) > at > org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93) > at > org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106) > at > o
[jira] [Resolved] (CALCITE-6387) Calcite build while compiliation with jdk17+
[ https://issues.apache.org/jira/browse/CALCITE-6387?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sergey Nuyanzin resolved CALCITE-6387. -- Fix Version/s: 1.37.0 Resolution: Fixed > Calcite build while compiliation with jdk17+ > > > Key: CALCITE-6387 > URL: https://issues.apache.org/jira/browse/CALCITE-6387 > Project: Calcite > Issue Type: Bug >Affects Versions: 1.36.0 >Reporter: Sergey Nuyanzin >Assignee: Sergey Nuyanzin >Priority: Major > Labels: pull-request-available > Fix For: 1.37.0 > > > The issue appears with newly added Arrow adapter which requires > {noformat} > --add-opens=java.base/java.nio=ALL-UNNAMED > {noformat} > could be fixed with adding > {noformat} > plugins.withType { > tasks { > configureEach { > jvmArgs("-XX:+IgnoreUnrecognizedVMOptions") > jvmArgs("--add-opens=java.base/java.nio=ALL-UNNAMED") > } > } > } > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (CALCITE-6387) Calcite build while compiliation with jdk17+
[ https://issues.apache.org/jira/browse/CALCITE-6387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841655#comment-17841655 ] Sergey Nuyanzin commented on CALCITE-6387: -- Merged as [3e633f627814ca79d1e2c592cd2ce1384717d6ca|https://github.com/apache/calcite/commit/3e633f627814ca79d1e2c592cd2ce1384717d6ca] > Calcite build while compiliation with jdk17+ > > > Key: CALCITE-6387 > URL: https://issues.apache.org/jira/browse/CALCITE-6387 > Project: Calcite > Issue Type: Bug >Affects Versions: 1.36.0 >Reporter: Sergey Nuyanzin >Assignee: Sergey Nuyanzin >Priority: Major > Labels: pull-request-available > > The issue appears with newly added Arrow adapter which requires > {noformat} > --add-opens=java.base/java.nio=ALL-UNNAMED > {noformat} > could be fixed with adding > {noformat} > plugins.withType { > tasks { > configureEach { > jvmArgs("-XX:+IgnoreUnrecognizedVMOptions") > jvmArgs("--add-opens=java.base/java.nio=ALL-UNNAMED") > } > } > } > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (CALCITE-6300) Function MAP_VALUES/MAP_KEYS gives exception when mapVauleType and mapKeyType not equals map Biggest mapKeytype or mapValueType
[ https://issues.apache.org/jira/browse/CALCITE-6300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841649#comment-17841649 ] Caican Cai commented on CALCITE-6300: - [~mbudiu] Thank you for raising this issue. I can continue to fix this jira case based on subsequent replies. > Function MAP_VALUES/MAP_KEYS gives exception when mapVauleType and mapKeyType > not equals map Biggest mapKeytype or mapValueType > > > Key: CALCITE-6300 > URL: https://issues.apache.org/jira/browse/CALCITE-6300 > Project: Calcite > Issue Type: Bug > Components: core >Affects Versions: 1.36.0 >Reporter: Caican Cai >Assignee: Caican Cai >Priority: Major > Labels: pull-request-available > Fix For: 1.37.0 > > > If we run the expression below in calcite, it will cause exception: > {code:java} > map_values(map('foo', cast (2 as tinyint), 'bar', 2)) {code} > {code:java} > java.lang.ClassCastException: java.lang.Byte cannot be cast to > java.lang.Integer > at > org.apache.calcite.avatica.util.AbstractCursor$IntAccessor.getInt(AbstractCursor.java:522) >at > org.apache.calcite.avatica.util.AbstractCursor$ArrayAccessor.convertValue(AbstractCursor.java:1396) > at > org.apache.calcite.avatica.util.AbstractCursor$ArrayAccessor.getObject(AbstractCursor.java:1377) > at > org.apache.calcite.avatica.util.AbstractCursor$ArrayAccessor.getArray(AbstractCursor.java:1432) > at > org.apache.calcite.avatica.util.AbstractCursor$ArrayAccessor.getString(AbstractCursor.java:1444) > at > org.apache.calcite.avatica.AvaticaResultSet.getString(AvaticaResultSet.java:241) > at org.apache.calcite.util.JdbcTypeImpl$10.get(JdbcTypeImpl.java:112) > at org.apache.calcite.util.JdbcTypeImpl$10.get(JdbcTypeImpl.java:109) at > org.apache.calcite.sql.test.ResultCheckers.compareResultSetWithMatcher(ResultCheckers.java:248) > at > org.apache.calcite.sql.test.ResultCheckers$MatcherResultChecker.checkResult(ResultCheckers.java:321) > at > org.apache.calcite.test.SqlOperatorTest$TesterImpl.check(SqlOperatorTest.java:14300) > at org.apache.calcite.sql.test.SqlTester.check(SqlTester.java:160) at > org.apache.calcite.test.SqlOperatorFixtureImpl.lambda$checkScalar$2(SqlOperatorFixtureImpl.java:226) > at > org.apache.calcite.sql.test.AbstractSqlTester.forEachQuery(AbstractSqlTester.java:450) >at > org.apache.calcite.test.SqlOperatorFixtureImpl.checkScalar(SqlOperatorFixtureImpl.java:225) > at > org.apache.calcite.sql.test.SqlOperatorFixture.checkScalar(SqlOperatorFixture.java:229) > at > org.apache.calcite.test.SqlOperatorTest.testMapValuesFunc(SqlOperatorTest.java:7276) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) >at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) at > org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727) >at > org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60) > at > org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131) > at > org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156) > at > org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147) >at > org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86) > at > org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103) > at > org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93) > at > org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106) > at > org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64) > at > org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45) > at > org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37) >
[jira] [Commented] (CALCITE-6390) ArrowAdapterTest fails on Windows
[ https://issues.apache.org/jira/browse/CALCITE-6390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841648#comment-17841648 ] Caican Cai commented on CALCITE-6390: - +1, I also found this problem, I will test it on WSL in Windows later, if it passes, I think we can explain it in the documentation > ArrowAdapterTest fails on Windows > - > > Key: CALCITE-6390 > URL: https://issues.apache.org/jira/browse/CALCITE-6390 > Project: Calcite > Issue Type: Sub-task >Reporter: Sergey Nuyanzin >Priority: Major > > -That's seems somehow highlights the difference between Windows Server and > non Server- > -we have tests against Windows Server on gha (windows-latest) and they are > green- > -At the same time local tests on Windows 11 show that {{ArrowAdapterTest}} > fails like- > Based on deeper analysis Arrow module was never tested on Windows since for > Windows conf on gha it is {{--exclude-task :arrow:build}} which makes it > skipping the tests for this module > https://github.com/apache/calcite/blob/aa8d81bf1ff39e3632aeb856fc4cc247ce9727e5/.github/workflows/main.yml#L110C60-L110C88 > Any attempt to test it leads to > {noformat} > FAILURE 0.0sec, org.apache.calcite.adapter.arrow.ArrowAdapterTest > > executionError > java.io.IOException: Failed to delete temp directory > D:\MyConfiguration\cancai.cai\AppData\Local\Temp\junit5105379620525559011. > The following paths could not be deleted (see suppressed exceptions for > details): , arrow > at > org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.createIOExceptionWithAttachedFailures(TempDirectory.java:350) > at > org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.close(TempDirectory.java:251) > at > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > at > org.junit.jupiter.engine.execution.ExtensionValuesStore.lambda$closeAllStoredCloseableValues$3(ExtensionValuesStore.java:68) > at > java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) > at > java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) > at java.util.ArrayList.forEach(ArrayList.java:1259) > at java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:390) > at java.util.stream.Sink$ChainedReference.end(Sink.java:258) > at > java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:483) > at > java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) > at > java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) > at > java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) > at > java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) > at > java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) > at > org.junit.jupiter.engine.execution.ExtensionValuesStore.closeAllStoredCloseableValues(ExtensionValuesStore.java:68) > at > org.junit.jupiter.engine.descriptor.AbstractExtensionContext.close(AbstractExtensionContext.java:80) > at > org.junit.jupiter.engine.execution.JupiterEngineExecutionContext.close(JupiterEngineExecutionContext.java:53) > at > org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:222) > at > org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:57) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$cleanUp$10(NodeTestTask.java:167) > at > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.cleanUp(NodeTestTask.java:167) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:98) > at > org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:185) > at > org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.invokeAll(ForkJoinPoolHierarchicalTestExecutorService.java:129) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) > at > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execu
[jira] [Updated] (CALCITE-6390) ArrowAdapterTest fails on Windows
[ https://issues.apache.org/jira/browse/CALCITE-6390?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sergey Nuyanzin updated CALCITE-6390: - Parent: CALCITE-6304 Issue Type: Sub-task (was: Bug) > ArrowAdapterTest fails on Windows > - > > Key: CALCITE-6390 > URL: https://issues.apache.org/jira/browse/CALCITE-6390 > Project: Calcite > Issue Type: Sub-task >Reporter: Sergey Nuyanzin >Priority: Major > > -That's seems somehow highlights the difference between Windows Server and > non Server- > -we have tests against Windows Server on gha (windows-latest) and they are > green- > -At the same time local tests on Windows 11 show that {{ArrowAdapterTest}} > fails like- > Based on deeper analysis Arrow module was never tested on Windows since for > Windows conf on gha it is {{--exclude-task :arrow:build}} which makes it > skipping the tests for this module > https://github.com/apache/calcite/blob/aa8d81bf1ff39e3632aeb856fc4cc247ce9727e5/.github/workflows/main.yml#L110C60-L110C88 > Any attempt to test it leads to > {noformat} > FAILURE 0.0sec, org.apache.calcite.adapter.arrow.ArrowAdapterTest > > executionError > java.io.IOException: Failed to delete temp directory > D:\MyConfiguration\cancai.cai\AppData\Local\Temp\junit5105379620525559011. > The following paths could not be deleted (see suppressed exceptions for > details): , arrow > at > org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.createIOExceptionWithAttachedFailures(TempDirectory.java:350) > at > org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.close(TempDirectory.java:251) > at > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > at > org.junit.jupiter.engine.execution.ExtensionValuesStore.lambda$closeAllStoredCloseableValues$3(ExtensionValuesStore.java:68) > at > java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) > at > java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) > at java.util.ArrayList.forEach(ArrayList.java:1259) > at java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:390) > at java.util.stream.Sink$ChainedReference.end(Sink.java:258) > at > java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:483) > at > java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) > at > java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) > at > java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) > at > java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) > at > java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) > at > org.junit.jupiter.engine.execution.ExtensionValuesStore.closeAllStoredCloseableValues(ExtensionValuesStore.java:68) > at > org.junit.jupiter.engine.descriptor.AbstractExtensionContext.close(AbstractExtensionContext.java:80) > at > org.junit.jupiter.engine.execution.JupiterEngineExecutionContext.close(JupiterEngineExecutionContext.java:53) > at > org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:222) > at > org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:57) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$cleanUp$10(NodeTestTask.java:167) > at > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.cleanUp(NodeTestTask.java:167) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:98) > at > org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:185) > at > org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.invokeAll(ForkJoinPoolHierarchicalTestExecutorService.java:129) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) > at > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$execute
[jira] [Updated] (CALCITE-6390) ArrowAdapterTest fails on Windows
[ https://issues.apache.org/jira/browse/CALCITE-6390?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sergey Nuyanzin updated CALCITE-6390: - Description: -That's seems somehow highlights the difference between Windows Server and non Server- -we have tests against Windows Server on gha (windows-latest) and they are green- -At the same time local tests on Windows 11 show that {{ArrowAdapterTest}} fails like- Based on deeper analysis Arrow module was never tested on Windows since for Windows conf on gha it is {{--exclude-task :arrow:build}} which makes it skipping the tests for this module https://github.com/apache/calcite/blob/aa8d81bf1ff39e3632aeb856fc4cc247ce9727e5/.github/workflows/main.yml#L110C60-L110C88 Any attempt to test it leads to {noformat} FAILURE 0.0sec, org.apache.calcite.adapter.arrow.ArrowAdapterTest > executionError java.io.IOException: Failed to delete temp directory D:\MyConfiguration\cancai.cai\AppData\Local\Temp\junit5105379620525559011. The following paths could not be deleted (see suppressed exceptions for details): , arrow at org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.createIOExceptionWithAttachedFailures(TempDirectory.java:350) at org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.close(TempDirectory.java:251) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.execution.ExtensionValuesStore.lambda$closeAllStoredCloseableValues$3(ExtensionValuesStore.java:68) at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.ArrayList.forEach(ArrayList.java:1259) at java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:390) at java.util.stream.Sink$ChainedReference.end(Sink.java:258) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:483) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) at org.junit.jupiter.engine.execution.ExtensionValuesStore.closeAllStoredCloseableValues(ExtensionValuesStore.java:68) at org.junit.jupiter.engine.descriptor.AbstractExtensionContext.close(AbstractExtensionContext.java:80) at org.junit.jupiter.engine.execution.JupiterEngineExecutionContext.close(JupiterEngineExecutionContext.java:53) at org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:222) at org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:57) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$cleanUp$10(NodeTestTask.java:167) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.cleanUp(NodeTestTask.java:167) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:98) at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:185) at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.invokeAll(ForkJoinPoolHierarchicalTestExecutorService.java:129) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) Suppressed: java.nio.file.DirectoryNotEmptyException: D:\MyConfiguration\cancai.cai\AppData\Local\Temp\junit5105379620525559011 {noformat} UPD: from one side it was merged with a comm
[jira] [Updated] (CALCITE-6390) ArrowAdapterTest fails on Windows
[ https://issues.apache.org/jira/browse/CALCITE-6390?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sergey Nuyanzin updated CALCITE-6390: - Summary: ArrowAdapterTest fails on Windows (was: ArrowAdapterTest fails on Windows 11) > ArrowAdapterTest fails on Windows > - > > Key: CALCITE-6390 > URL: https://issues.apache.org/jira/browse/CALCITE-6390 > Project: Calcite > Issue Type: Bug >Reporter: Sergey Nuyanzin >Priority: Major > > -That's seems somehow highlights the difference between Windows Server and > non Server- > -we have tests against Windows Server on gha (windows-latest) and they are > green- > -At the same time local tests on Windows 11 show that {{ArrowAdapterTest}} > fails like- > Based on deeper analysis Arrow module was never tested on Windows since for > Windows conf on gha it is {{--exclude-task :arrow:build}} which makes it > skipping the tests for this module > https://github.com/apache/calcite/blob/aa8d81bf1ff39e3632aeb856fc4cc247ce9727e5/.github/workflows/main.yml#L110C60-L110C88 > Any attempt to test it leads to > {noformat} > FAILURE 0.0sec, org.apache.calcite.adapter.arrow.ArrowAdapterTest > > executionError > java.io.IOException: Failed to delete temp directory > D:\MyConfiguration\cancai.cai\AppData\Local\Temp\junit5105379620525559011. > The following paths could not be deleted (see suppressed exceptions for > details): , arrow > at > org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.createIOExceptionWithAttachedFailures(TempDirectory.java:350) > at > org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.close(TempDirectory.java:251) > at > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > at > org.junit.jupiter.engine.execution.ExtensionValuesStore.lambda$closeAllStoredCloseableValues$3(ExtensionValuesStore.java:68) > at > java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) > at > java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) > at java.util.ArrayList.forEach(ArrayList.java:1259) > at java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:390) > at java.util.stream.Sink$ChainedReference.end(Sink.java:258) > at > java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:483) > at > java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) > at > java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) > at > java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) > at > java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) > at > java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) > at > org.junit.jupiter.engine.execution.ExtensionValuesStore.closeAllStoredCloseableValues(ExtensionValuesStore.java:68) > at > org.junit.jupiter.engine.descriptor.AbstractExtensionContext.close(AbstractExtensionContext.java:80) > at > org.junit.jupiter.engine.execution.JupiterEngineExecutionContext.close(JupiterEngineExecutionContext.java:53) > at > org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:222) > at > org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:57) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$cleanUp$10(NodeTestTask.java:167) > at > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.cleanUp(NodeTestTask.java:167) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:98) > at > org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:185) > at > org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.invokeAll(ForkJoinPoolHierarchicalTestExecutorService.java:129) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) > at > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > at > org.junit.platform.engine.support.hierarchical.NodeT
[jira] [Comment Edited] (CALCITE-6390) ArrowAdapterTest fails on Windows 11
[ https://issues.apache.org/jira/browse/CALCITE-6390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841633#comment-17841633 ] Sergey Nuyanzin edited comment on CALCITE-6390 at 4/28/24 12:10 PM: A couple of observations search across the internet shows that it might be JUnit5/Windows issue [https://github.com/junit-team/junit5/issues/2811] which is not fixed yet I tried to replace {{TempDir}} with {{deleteOnExit}} as mentioned in some comments of the JUnit5 issue after that it started to fail as {noformat} FAILURE 0.2sec, org.apache.calcite.adapter.arrow.ArrowAdapterTest > testCastDecimalToFloat() java.sql.SQLException: Error while executing SQL "select CAST(LOSAL AS FLOAT) as "extra" from SALGRADE": x86_64/gandiva_jni.dll was not found inside JAR. at org.apache.calcite.avatica.Helper.createException(Helper.java:56) at org.apache.calcite.avatica.Helper.createException(Helper.java:41) at org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:164) at org.apache.calcite.avatica.AvaticaStatement.executeQuery(AvaticaStatement.java:228) at org.apache.calcite.test.CalciteAssert.assertQuery(CalciteAssert.java:566) at org.apache.calcite.test.CalciteAssert$AssertQuery.lambda$typeIs$5(CalciteAssert.java:1554) at org.apache.calcite.test.CalciteAssert$AssertQuery.withConnection(CalciteAssert.java:1434) at org.apache.calcite.test.CalciteAssert$AssertQuery.typeIs(CalciteAssert.java:1553) at org.apache.calcite.adapter.arrow.ArrowAdapterTest.testCastDecimalToFloat(ArrowAdapterTest.java:508) Suppressed: org.apache.calcite.util.TestUtil$ExtraInformation: With materializationsEnabled=false, limit=-1 at org.apache.calcite.util.TestUtil.rethrow(TestUtil.java:389) at org.apache.calcite.test.CalciteAssert.assertQuery(CalciteAssert.java:598) ... 4 more Next exception 1: [CIRCULAR REFERENCE SQLException] Next exception 2: java.lang.RuntimeException: x86_64/gandiva_jni.dll was not found inside JAR. at org.apache.calcite.util.Util.toUnchecked(Util.java:989) at org.apache.calcite.adapter.arrow.ArrowTable.query(ArrowTable.java:113) at org.apache.calcite.jdbc.CalcitePrepare$CalciteSignature.enumerable(CalcitePrepare.java:364) at org.apache.calcite.jdbc.CalciteConnectionImpl.enumerable(CalciteConnectionImpl.java:326) at org.apache.calcite.jdbc.CalciteMetaImpl._createIterable(CalciteMetaImpl.java:657) at org.apache.calcite.jdbc.CalciteMetaImpl.createIterable(CalciteMetaImpl.java:648) at org.apache.calcite.avatica.AvaticaResultSet.execute(AvaticaResultSet.java:184) at org.apache.calcite.jdbc.CalciteResultSet.execute(CalciteResultSet.java:64) at org.apache.calcite.jdbc.CalciteResultSet.execute(CalciteResultSet.java:43) at org.apache.calcite.avatica.AvaticaConnection$1.execute(AvaticaConnection.java:669) at org.apache.calcite.jdbc.CalciteMetaImpl.prepareAndExecute(CalciteMetaImpl.java:717) at org.apache.calcite.avatica.AvaticaConnection.prepareAndExecuteInternal(AvaticaConnection.java:677) at org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:157) ... 6 more Caused by: x86_64/gandiva_jni.dll was not found inside JAR. at org.apache.arrow.gandiva.evaluator.JniLoader.moveFileFromJarToTemp(JniLoader.java:100) at org.apache.arrow.gandiva.evaluator.JniLoader.loadGandivaLibraryFromJar(JniLoader.java:75) at org.apache.arrow.gandiva.evaluator.JniLoader.setupInstance(JniLoader.java:64) at org.apache.arrow.gandiva.evaluator.JniLoader.getInstance(JniLoader.java:54) at org.apache.arrow.gandiva.evaluator.JniLoader.getDefaultConfiguration(JniLoader.java:160) at org.apache.arrow.gandiva.evaluator.Projector.make(Projector.java:78) at org.apache.calcite.adapter.arrow.ArrowTable.query(ArrowTable.java:111) ... 17 more Next exception 3: [CIRCULAR REFERENCE PlaceholderException] Caused by: [CIRCULAR REFERENCE RuntimeException] {noformat} -Again it continues passing on gha Windows Server (windows-latest) and fails on Windows 11...- UPDATE: I looked inside {{arrow-gandiva-15.0.0.jar}} and there is no such dll... There are only {{\*.so}} and {{\*.dylib}} files. There are some notes about these files on Arrow's site, probably we need to follow these steps [https://arrow.apache.org/docs/developers/java/building.html#building-jni-libraries-dylib-so-dll] UPDATE: as I also mentioned in description it seems this module was never tested against Windows because of this flag {{--ex
[jira] [Updated] (CALCITE-6390) ArrowAdapterTest fails on Windows 11
[ https://issues.apache.org/jira/browse/CALCITE-6390?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sergey Nuyanzin updated CALCITE-6390: - Description: -That's seems somehow highlights the difference between Windows Server and non Server- -we have tests against Windows Server on gha (windows-latest) and they are green- -At the same time local tests on Windows 11 show that {{ArrowAdapterTest}} fails like- Based on deeper analysis Arrow module was never tested on Windows since for Windows conf on gha it is {{--exclude-task :arrow:build}} which makes it skipping the tests for this module https://github.com/apache/calcite/blob/aa8d81bf1ff39e3632aeb856fc4cc247ce9727e5/.github/workflows/main.yml#L110C60-L110C88 Any attempt to test it leads to {noformat} FAILURE 0.0sec, org.apache.calcite.adapter.arrow.ArrowAdapterTest > executionError java.io.IOException: Failed to delete temp directory D:\MyConfiguration\cancai.cai\AppData\Local\Temp\junit5105379620525559011. The following paths could not be deleted (see suppressed exceptions for details): , arrow at org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.createIOExceptionWithAttachedFailures(TempDirectory.java:350) at org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.close(TempDirectory.java:251) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.execution.ExtensionValuesStore.lambda$closeAllStoredCloseableValues$3(ExtensionValuesStore.java:68) at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.ArrayList.forEach(ArrayList.java:1259) at java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:390) at java.util.stream.Sink$ChainedReference.end(Sink.java:258) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:483) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) at org.junit.jupiter.engine.execution.ExtensionValuesStore.closeAllStoredCloseableValues(ExtensionValuesStore.java:68) at org.junit.jupiter.engine.descriptor.AbstractExtensionContext.close(AbstractExtensionContext.java:80) at org.junit.jupiter.engine.execution.JupiterEngineExecutionContext.close(JupiterEngineExecutionContext.java:53) at org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:222) at org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:57) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$cleanUp$10(NodeTestTask.java:167) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.cleanUp(NodeTestTask.java:167) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:98) at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:185) at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.invokeAll(ForkJoinPoolHierarchicalTestExecutorService.java:129) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) Suppressed: java.nio.file.DirectoryNotEmptyException: D:\MyConfiguration\cancai.cai\AppData\Local\Temp\junit5105379620525559011 {noformat} was: -That's seems somehow highlig
[jira] [Comment Edited] (CALCITE-6390) ArrowAdapterTest fails on Windows 11
[ https://issues.apache.org/jira/browse/CALCITE-6390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841633#comment-17841633 ] Sergey Nuyanzin edited comment on CALCITE-6390 at 4/28/24 12:09 PM: A couple of observations search across the internet shows that it might be JUnit5/Windows issue [https://github.com/junit-team/junit5/issues/2811] which is not fixed yet I tried to replace {{TempDir}} with {{deleteOnExit}} as mentioned in some comments of the JUnit5 issue after that it started to fail as {noformat} FAILURE 0.2sec, org.apache.calcite.adapter.arrow.ArrowAdapterTest > testCastDecimalToFloat() java.sql.SQLException: Error while executing SQL "select CAST(LOSAL AS FLOAT) as "extra" from SALGRADE": x86_64/gandiva_jni.dll was not found inside JAR. at org.apache.calcite.avatica.Helper.createException(Helper.java:56) at org.apache.calcite.avatica.Helper.createException(Helper.java:41) at org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:164) at org.apache.calcite.avatica.AvaticaStatement.executeQuery(AvaticaStatement.java:228) at org.apache.calcite.test.CalciteAssert.assertQuery(CalciteAssert.java:566) at org.apache.calcite.test.CalciteAssert$AssertQuery.lambda$typeIs$5(CalciteAssert.java:1554) at org.apache.calcite.test.CalciteAssert$AssertQuery.withConnection(CalciteAssert.java:1434) at org.apache.calcite.test.CalciteAssert$AssertQuery.typeIs(CalciteAssert.java:1553) at org.apache.calcite.adapter.arrow.ArrowAdapterTest.testCastDecimalToFloat(ArrowAdapterTest.java:508) Suppressed: org.apache.calcite.util.TestUtil$ExtraInformation: With materializationsEnabled=false, limit=-1 at org.apache.calcite.util.TestUtil.rethrow(TestUtil.java:389) at org.apache.calcite.test.CalciteAssert.assertQuery(CalciteAssert.java:598) ... 4 more Next exception 1: [CIRCULAR REFERENCE SQLException] Next exception 2: java.lang.RuntimeException: x86_64/gandiva_jni.dll was not found inside JAR. at org.apache.calcite.util.Util.toUnchecked(Util.java:989) at org.apache.calcite.adapter.arrow.ArrowTable.query(ArrowTable.java:113) at org.apache.calcite.jdbc.CalcitePrepare$CalciteSignature.enumerable(CalcitePrepare.java:364) at org.apache.calcite.jdbc.CalciteConnectionImpl.enumerable(CalciteConnectionImpl.java:326) at org.apache.calcite.jdbc.CalciteMetaImpl._createIterable(CalciteMetaImpl.java:657) at org.apache.calcite.jdbc.CalciteMetaImpl.createIterable(CalciteMetaImpl.java:648) at org.apache.calcite.avatica.AvaticaResultSet.execute(AvaticaResultSet.java:184) at org.apache.calcite.jdbc.CalciteResultSet.execute(CalciteResultSet.java:64) at org.apache.calcite.jdbc.CalciteResultSet.execute(CalciteResultSet.java:43) at org.apache.calcite.avatica.AvaticaConnection$1.execute(AvaticaConnection.java:669) at org.apache.calcite.jdbc.CalciteMetaImpl.prepareAndExecute(CalciteMetaImpl.java:717) at org.apache.calcite.avatica.AvaticaConnection.prepareAndExecuteInternal(AvaticaConnection.java:677) at org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:157) ... 6 more Caused by: x86_64/gandiva_jni.dll was not found inside JAR. at org.apache.arrow.gandiva.evaluator.JniLoader.moveFileFromJarToTemp(JniLoader.java:100) at org.apache.arrow.gandiva.evaluator.JniLoader.loadGandivaLibraryFromJar(JniLoader.java:75) at org.apache.arrow.gandiva.evaluator.JniLoader.setupInstance(JniLoader.java:64) at org.apache.arrow.gandiva.evaluator.JniLoader.getInstance(JniLoader.java:54) at org.apache.arrow.gandiva.evaluator.JniLoader.getDefaultConfiguration(JniLoader.java:160) at org.apache.arrow.gandiva.evaluator.Projector.make(Projector.java:78) at org.apache.calcite.adapter.arrow.ArrowTable.query(ArrowTable.java:111) ... 17 more Next exception 3: [CIRCULAR REFERENCE PlaceholderException] Caused by: [CIRCULAR REFERENCE RuntimeException] {noformat} -Again it continues passing on gha Windows Server (windows-latest) and fails on Windows 11...- UPDATE: I looked inside {{arrow-gandiva-15.0.0.jar}} and there is no such dll... There are only {{\*.so*}} and {{\*.dylib}} files. There are some notes about these files on Arrow's site, probably we need to follow these steps [https://arrow.apache.org/docs/developers/java/building.html#building-jni-libraries-dylib-so-dll] UPDATE: as I also mentioned in description it seems this module was never tested against Windows because of this flag {{ --ex
[jira] [Comment Edited] (CALCITE-6390) ArrowAdapterTest fails on Windows 11
[ https://issues.apache.org/jira/browse/CALCITE-6390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841633#comment-17841633 ] Sergey Nuyanzin edited comment on CALCITE-6390 at 4/28/24 12:08 PM: A couple of observations search across the internet shows that it might be JUnit5/Windows issue [https://github.com/junit-team/junit5/issues/2811] which is not fixed yet I tried to replace {{TempDir}} with {{deleteOnExit}} as mentioned in some comments of the JUnit5 issue after that it started to fail as {noformat} FAILURE 0.2sec, org.apache.calcite.adapter.arrow.ArrowAdapterTest > testCastDecimalToFloat() java.sql.SQLException: Error while executing SQL "select CAST(LOSAL AS FLOAT) as "extra" from SALGRADE": x86_64/gandiva_jni.dll was not found inside JAR. at org.apache.calcite.avatica.Helper.createException(Helper.java:56) at org.apache.calcite.avatica.Helper.createException(Helper.java:41) at org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:164) at org.apache.calcite.avatica.AvaticaStatement.executeQuery(AvaticaStatement.java:228) at org.apache.calcite.test.CalciteAssert.assertQuery(CalciteAssert.java:566) at org.apache.calcite.test.CalciteAssert$AssertQuery.lambda$typeIs$5(CalciteAssert.java:1554) at org.apache.calcite.test.CalciteAssert$AssertQuery.withConnection(CalciteAssert.java:1434) at org.apache.calcite.test.CalciteAssert$AssertQuery.typeIs(CalciteAssert.java:1553) at org.apache.calcite.adapter.arrow.ArrowAdapterTest.testCastDecimalToFloat(ArrowAdapterTest.java:508) Suppressed: org.apache.calcite.util.TestUtil$ExtraInformation: With materializationsEnabled=false, limit=-1 at org.apache.calcite.util.TestUtil.rethrow(TestUtil.java:389) at org.apache.calcite.test.CalciteAssert.assertQuery(CalciteAssert.java:598) ... 4 more Next exception 1: [CIRCULAR REFERENCE SQLException] Next exception 2: java.lang.RuntimeException: x86_64/gandiva_jni.dll was not found inside JAR. at org.apache.calcite.util.Util.toUnchecked(Util.java:989) at org.apache.calcite.adapter.arrow.ArrowTable.query(ArrowTable.java:113) at org.apache.calcite.jdbc.CalcitePrepare$CalciteSignature.enumerable(CalcitePrepare.java:364) at org.apache.calcite.jdbc.CalciteConnectionImpl.enumerable(CalciteConnectionImpl.java:326) at org.apache.calcite.jdbc.CalciteMetaImpl._createIterable(CalciteMetaImpl.java:657) at org.apache.calcite.jdbc.CalciteMetaImpl.createIterable(CalciteMetaImpl.java:648) at org.apache.calcite.avatica.AvaticaResultSet.execute(AvaticaResultSet.java:184) at org.apache.calcite.jdbc.CalciteResultSet.execute(CalciteResultSet.java:64) at org.apache.calcite.jdbc.CalciteResultSet.execute(CalciteResultSet.java:43) at org.apache.calcite.avatica.AvaticaConnection$1.execute(AvaticaConnection.java:669) at org.apache.calcite.jdbc.CalciteMetaImpl.prepareAndExecute(CalciteMetaImpl.java:717) at org.apache.calcite.avatica.AvaticaConnection.prepareAndExecuteInternal(AvaticaConnection.java:677) at org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:157) ... 6 more Caused by: x86_64/gandiva_jni.dll was not found inside JAR. at org.apache.arrow.gandiva.evaluator.JniLoader.moveFileFromJarToTemp(JniLoader.java:100) at org.apache.arrow.gandiva.evaluator.JniLoader.loadGandivaLibraryFromJar(JniLoader.java:75) at org.apache.arrow.gandiva.evaluator.JniLoader.setupInstance(JniLoader.java:64) at org.apache.arrow.gandiva.evaluator.JniLoader.getInstance(JniLoader.java:54) at org.apache.arrow.gandiva.evaluator.JniLoader.getDefaultConfiguration(JniLoader.java:160) at org.apache.arrow.gandiva.evaluator.Projector.make(Projector.java:78) at org.apache.calcite.adapter.arrow.ArrowTable.query(ArrowTable.java:111) ... 17 more Next exception 3: [CIRCULAR REFERENCE PlaceholderException] Caused by: [CIRCULAR REFERENCE RuntimeException] {noformat} -Again it continues passing on gha Windows Server (windows-latest) and fails on Windows 11...- UPDATE: I looked inside {{arrow-gandiva-15.0.0.jar}} and there is no such dll... There are only {{*.so}} and {{*.dylib}} files. There are some notes about these files on Arrow's site, probably we need to follow these steps https://arrow.apache.org/docs/developers/java/building.html#building-jni-libraries-dylib-so-dll UPDATE: as I also mentioned in description it seems this module was never tested against Windows because of this flag \{{ --ex
[jira] [Updated] (CALCITE-6390) ArrowAdapterTest fails on Windows 11
[ https://issues.apache.org/jira/browse/CALCITE-6390?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sergey Nuyanzin updated CALCITE-6390: - Description: -That's seems somehow highlights the difference between Windows Server and non Server- -we have tests against Windows Server on gha (windows-latest) and they are green- -At the same time local tests on Windows 11 show that {{ArrowAdapterTest}} fails like- Based on deeper analysis Arrow module was never tested on Windows since for Windows conf on gha it is {{ --exclude-task :arrow:build}} which makes it skipping the tests for this module Any attempt to test it leads to {noformat} FAILURE 0.0sec, org.apache.calcite.adapter.arrow.ArrowAdapterTest > executionError java.io.IOException: Failed to delete temp directory D:\MyConfiguration\cancai.cai\AppData\Local\Temp\junit5105379620525559011. The following paths could not be deleted (see suppressed exceptions for details): , arrow at org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.createIOExceptionWithAttachedFailures(TempDirectory.java:350) at org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.close(TempDirectory.java:251) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.execution.ExtensionValuesStore.lambda$closeAllStoredCloseableValues$3(ExtensionValuesStore.java:68) at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.ArrayList.forEach(ArrayList.java:1259) at java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:390) at java.util.stream.Sink$ChainedReference.end(Sink.java:258) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:483) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) at org.junit.jupiter.engine.execution.ExtensionValuesStore.closeAllStoredCloseableValues(ExtensionValuesStore.java:68) at org.junit.jupiter.engine.descriptor.AbstractExtensionContext.close(AbstractExtensionContext.java:80) at org.junit.jupiter.engine.execution.JupiterEngineExecutionContext.close(JupiterEngineExecutionContext.java:53) at org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:222) at org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:57) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$cleanUp$10(NodeTestTask.java:167) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.cleanUp(NodeTestTask.java:167) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:98) at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:185) at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.invokeAll(ForkJoinPoolHierarchicalTestExecutorService.java:129) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) Suppressed: java.nio.file.DirectoryNotEmptyException: D:\MyConfiguration\cancai.cai\AppData\Local\Temp\junit5105379620525559011 {noformat} was: That's seems somehow highlights the difference between Windows Server and non Server we have tests against Windows Server on gha (windows-latest) and they are gr
[jira] [Updated] (CALCITE-6390) ArrowAdapterTest fails on Windows 11
[ https://issues.apache.org/jira/browse/CALCITE-6390?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sergey Nuyanzin updated CALCITE-6390: - Description: -That's seems somehow highlights the difference between Windows Server and non Server- -we have tests against Windows Server on gha (windows-latest) and they are green- -At the same time local tests on Windows 11 show that {{ArrowAdapterTest}} fails like- Based on deeper analysis Arrow module was never tested on Windows since for Windows conf on gha it is {{--exclude-task :arrow:build}} which makes it skipping the tests for this module Any attempt to test it leads to {noformat} FAILURE 0.0sec, org.apache.calcite.adapter.arrow.ArrowAdapterTest > executionError java.io.IOException: Failed to delete temp directory D:\MyConfiguration\cancai.cai\AppData\Local\Temp\junit5105379620525559011. The following paths could not be deleted (see suppressed exceptions for details): , arrow at org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.createIOExceptionWithAttachedFailures(TempDirectory.java:350) at org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.close(TempDirectory.java:251) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.execution.ExtensionValuesStore.lambda$closeAllStoredCloseableValues$3(ExtensionValuesStore.java:68) at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.ArrayList.forEach(ArrayList.java:1259) at java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:390) at java.util.stream.Sink$ChainedReference.end(Sink.java:258) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:483) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) at org.junit.jupiter.engine.execution.ExtensionValuesStore.closeAllStoredCloseableValues(ExtensionValuesStore.java:68) at org.junit.jupiter.engine.descriptor.AbstractExtensionContext.close(AbstractExtensionContext.java:80) at org.junit.jupiter.engine.execution.JupiterEngineExecutionContext.close(JupiterEngineExecutionContext.java:53) at org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:222) at org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:57) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$cleanUp$10(NodeTestTask.java:167) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.cleanUp(NodeTestTask.java:167) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:98) at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:185) at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.invokeAll(ForkJoinPoolHierarchicalTestExecutorService.java:129) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) Suppressed: java.nio.file.DirectoryNotEmptyException: D:\MyConfiguration\cancai.cai\AppData\Local\Temp\junit5105379620525559011 {noformat} was: -That's seems somehow highlights the difference between Windows Server and non Server- -we have tests against Windows Server on gha (windows-lat
[jira] [Comment Edited] (CALCITE-6390) ArrowAdapterTest fails on Windows 11
[ https://issues.apache.org/jira/browse/CALCITE-6390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841633#comment-17841633 ] Sergey Nuyanzin edited comment on CALCITE-6390 at 4/28/24 11:34 AM: A couple of observations search across the internet shows that it might be JUnit5/Windows issue [https://github.com/junit-team/junit5/issues/2811] which is not fixed yet I tried to replace {{TempDir}} with {{deleteOnExit}} as mentioned in some comments of the JUnit5 issue after that it started to fail as {noformat} FAILURE 0.2sec, org.apache.calcite.adapter.arrow.ArrowAdapterTest > testCastDecimalToFloat() java.sql.SQLException: Error while executing SQL "select CAST(LOSAL AS FLOAT) as "extra" from SALGRADE": x86_64/gandiva_jni.dll was not found inside JAR. at org.apache.calcite.avatica.Helper.createException(Helper.java:56) at org.apache.calcite.avatica.Helper.createException(Helper.java:41) at org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:164) at org.apache.calcite.avatica.AvaticaStatement.executeQuery(AvaticaStatement.java:228) at org.apache.calcite.test.CalciteAssert.assertQuery(CalciteAssert.java:566) at org.apache.calcite.test.CalciteAssert$AssertQuery.lambda$typeIs$5(CalciteAssert.java:1554) at org.apache.calcite.test.CalciteAssert$AssertQuery.withConnection(CalciteAssert.java:1434) at org.apache.calcite.test.CalciteAssert$AssertQuery.typeIs(CalciteAssert.java:1553) at org.apache.calcite.adapter.arrow.ArrowAdapterTest.testCastDecimalToFloat(ArrowAdapterTest.java:508) Suppressed: org.apache.calcite.util.TestUtil$ExtraInformation: With materializationsEnabled=false, limit=-1 at org.apache.calcite.util.TestUtil.rethrow(TestUtil.java:389) at org.apache.calcite.test.CalciteAssert.assertQuery(CalciteAssert.java:598) ... 4 more Next exception 1: [CIRCULAR REFERENCE SQLException] Next exception 2: java.lang.RuntimeException: x86_64/gandiva_jni.dll was not found inside JAR. at org.apache.calcite.util.Util.toUnchecked(Util.java:989) at org.apache.calcite.adapter.arrow.ArrowTable.query(ArrowTable.java:113) at org.apache.calcite.jdbc.CalcitePrepare$CalciteSignature.enumerable(CalcitePrepare.java:364) at org.apache.calcite.jdbc.CalciteConnectionImpl.enumerable(CalciteConnectionImpl.java:326) at org.apache.calcite.jdbc.CalciteMetaImpl._createIterable(CalciteMetaImpl.java:657) at org.apache.calcite.jdbc.CalciteMetaImpl.createIterable(CalciteMetaImpl.java:648) at org.apache.calcite.avatica.AvaticaResultSet.execute(AvaticaResultSet.java:184) at org.apache.calcite.jdbc.CalciteResultSet.execute(CalciteResultSet.java:64) at org.apache.calcite.jdbc.CalciteResultSet.execute(CalciteResultSet.java:43) at org.apache.calcite.avatica.AvaticaConnection$1.execute(AvaticaConnection.java:669) at org.apache.calcite.jdbc.CalciteMetaImpl.prepareAndExecute(CalciteMetaImpl.java:717) at org.apache.calcite.avatica.AvaticaConnection.prepareAndExecuteInternal(AvaticaConnection.java:677) at org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:157) ... 6 more Caused by: x86_64/gandiva_jni.dll was not found inside JAR. at org.apache.arrow.gandiva.evaluator.JniLoader.moveFileFromJarToTemp(JniLoader.java:100) at org.apache.arrow.gandiva.evaluator.JniLoader.loadGandivaLibraryFromJar(JniLoader.java:75) at org.apache.arrow.gandiva.evaluator.JniLoader.setupInstance(JniLoader.java:64) at org.apache.arrow.gandiva.evaluator.JniLoader.getInstance(JniLoader.java:54) at org.apache.arrow.gandiva.evaluator.JniLoader.getDefaultConfiguration(JniLoader.java:160) at org.apache.arrow.gandiva.evaluator.Projector.make(Projector.java:78) at org.apache.calcite.adapter.arrow.ArrowTable.query(ArrowTable.java:111) ... 17 more Next exception 3: [CIRCULAR REFERENCE PlaceholderException] Caused by: [CIRCULAR REFERENCE RuntimeException] {noformat} Again it continues passing on gha Windows Server (windows-latest) and fails on Windows 11... UPDATE: I looked inside {{arrow-gandiva-15.0.0.jar}} and there is no such dll... There are only {{*.so}} and {{*.dylib}} files. was (Author: sergey nuyanzin): A couple of observations search across the internet shows that it might be JUnit5/Windows issue [https://github.com/junit-team/junit5/issues/2811] which is not fixed yet I tried to replace {{TempDir}} with {{deleteOnExit}} as mentioned in some comments of the JUnit5 issue after that it starte
[jira] [Comment Edited] (CALCITE-6390) ArrowAdapterTest fails on Windows 11
[ https://issues.apache.org/jira/browse/CALCITE-6390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841633#comment-17841633 ] Sergey Nuyanzin edited comment on CALCITE-6390 at 4/28/24 11:34 AM: A couple of observations search across the internet shows that it might be JUnit5/Windows issue [https://github.com/junit-team/junit5/issues/2811] which is not fixed yet I tried to replace {{TempDir}} with {{deleteOnExit}} as mentioned in some comments of the JUnit5 issue after that it started to fail as {noformat} FAILURE 0.2sec, org.apache.calcite.adapter.arrow.ArrowAdapterTest > testCastDecimalToFloat() java.sql.SQLException: Error while executing SQL "select CAST(LOSAL AS FLOAT) as "extra" from SALGRADE": x86_64/gandiva_jni.dll was not found inside JAR. at org.apache.calcite.avatica.Helper.createException(Helper.java:56) at org.apache.calcite.avatica.Helper.createException(Helper.java:41) at org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:164) at org.apache.calcite.avatica.AvaticaStatement.executeQuery(AvaticaStatement.java:228) at org.apache.calcite.test.CalciteAssert.assertQuery(CalciteAssert.java:566) at org.apache.calcite.test.CalciteAssert$AssertQuery.lambda$typeIs$5(CalciteAssert.java:1554) at org.apache.calcite.test.CalciteAssert$AssertQuery.withConnection(CalciteAssert.java:1434) at org.apache.calcite.test.CalciteAssert$AssertQuery.typeIs(CalciteAssert.java:1553) at org.apache.calcite.adapter.arrow.ArrowAdapterTest.testCastDecimalToFloat(ArrowAdapterTest.java:508) Suppressed: org.apache.calcite.util.TestUtil$ExtraInformation: With materializationsEnabled=false, limit=-1 at org.apache.calcite.util.TestUtil.rethrow(TestUtil.java:389) at org.apache.calcite.test.CalciteAssert.assertQuery(CalciteAssert.java:598) ... 4 more Next exception 1: [CIRCULAR REFERENCE SQLException] Next exception 2: java.lang.RuntimeException: x86_64/gandiva_jni.dll was not found inside JAR. at org.apache.calcite.util.Util.toUnchecked(Util.java:989) at org.apache.calcite.adapter.arrow.ArrowTable.query(ArrowTable.java:113) at org.apache.calcite.jdbc.CalcitePrepare$CalciteSignature.enumerable(CalcitePrepare.java:364) at org.apache.calcite.jdbc.CalciteConnectionImpl.enumerable(CalciteConnectionImpl.java:326) at org.apache.calcite.jdbc.CalciteMetaImpl._createIterable(CalciteMetaImpl.java:657) at org.apache.calcite.jdbc.CalciteMetaImpl.createIterable(CalciteMetaImpl.java:648) at org.apache.calcite.avatica.AvaticaResultSet.execute(AvaticaResultSet.java:184) at org.apache.calcite.jdbc.CalciteResultSet.execute(CalciteResultSet.java:64) at org.apache.calcite.jdbc.CalciteResultSet.execute(CalciteResultSet.java:43) at org.apache.calcite.avatica.AvaticaConnection$1.execute(AvaticaConnection.java:669) at org.apache.calcite.jdbc.CalciteMetaImpl.prepareAndExecute(CalciteMetaImpl.java:717) at org.apache.calcite.avatica.AvaticaConnection.prepareAndExecuteInternal(AvaticaConnection.java:677) at org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:157) ... 6 more Caused by: x86_64/gandiva_jni.dll was not found inside JAR. at org.apache.arrow.gandiva.evaluator.JniLoader.moveFileFromJarToTemp(JniLoader.java:100) at org.apache.arrow.gandiva.evaluator.JniLoader.loadGandivaLibraryFromJar(JniLoader.java:75) at org.apache.arrow.gandiva.evaluator.JniLoader.setupInstance(JniLoader.java:64) at org.apache.arrow.gandiva.evaluator.JniLoader.getInstance(JniLoader.java:54) at org.apache.arrow.gandiva.evaluator.JniLoader.getDefaultConfiguration(JniLoader.java:160) at org.apache.arrow.gandiva.evaluator.Projector.make(Projector.java:78) at org.apache.calcite.adapter.arrow.ArrowTable.query(ArrowTable.java:111) ... 17 more Next exception 3: [CIRCULAR REFERENCE PlaceholderException] Caused by: [CIRCULAR REFERENCE RuntimeException] {noformat} Again it continues passing on gha Windows Server (windows-latest) and fails on Windows 11... UPDATE: I looked inside {{arrow-gandiva-15.0.0.jar}} and there is no such dll... There are only {{\*.so}} and {{\*.dylib}} files. was (Author: sergey nuyanzin): A couple of observations search across the internet shows that it might be JUnit5/Windows issue [https://github.com/junit-team/junit5/issues/2811] which is not fixed yet I tried to replace {{TempDir}} with {{deleteOnExit}} as mentioned in some comments of the JUnit5 issue after that it start
[jira] [Comment Edited] (CALCITE-6390) ArrowAdapterTest fails on Windows 11
[ https://issues.apache.org/jira/browse/CALCITE-6390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841633#comment-17841633 ] Sergey Nuyanzin edited comment on CALCITE-6390 at 4/28/24 11:33 AM: A couple of observations search across the internet shows that it might be JUnit5/Windows issue [https://github.com/junit-team/junit5/issues/2811] which is not fixed yet I tried to replace {{TempDir}} with {{deleteOnExit}} as mentioned in some comments of the JUnit5 issue after that it started to fail as {noformat} FAILURE 0.2sec, org.apache.calcite.adapter.arrow.ArrowAdapterTest > testCastDecimalToFloat() java.sql.SQLException: Error while executing SQL "select CAST(LOSAL AS FLOAT) as "extra" from SALGRADE": x86_64/gandiva_jni.dll was not found inside JAR. at org.apache.calcite.avatica.Helper.createException(Helper.java:56) at org.apache.calcite.avatica.Helper.createException(Helper.java:41) at org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:164) at org.apache.calcite.avatica.AvaticaStatement.executeQuery(AvaticaStatement.java:228) at org.apache.calcite.test.CalciteAssert.assertQuery(CalciteAssert.java:566) at org.apache.calcite.test.CalciteAssert$AssertQuery.lambda$typeIs$5(CalciteAssert.java:1554) at org.apache.calcite.test.CalciteAssert$AssertQuery.withConnection(CalciteAssert.java:1434) at org.apache.calcite.test.CalciteAssert$AssertQuery.typeIs(CalciteAssert.java:1553) at org.apache.calcite.adapter.arrow.ArrowAdapterTest.testCastDecimalToFloat(ArrowAdapterTest.java:508) Suppressed: org.apache.calcite.util.TestUtil$ExtraInformation: With materializationsEnabled=false, limit=-1 at org.apache.calcite.util.TestUtil.rethrow(TestUtil.java:389) at org.apache.calcite.test.CalciteAssert.assertQuery(CalciteAssert.java:598) ... 4 more Next exception 1: [CIRCULAR REFERENCE SQLException] Next exception 2: java.lang.RuntimeException: x86_64/gandiva_jni.dll was not found inside JAR. at org.apache.calcite.util.Util.toUnchecked(Util.java:989) at org.apache.calcite.adapter.arrow.ArrowTable.query(ArrowTable.java:113) at org.apache.calcite.jdbc.CalcitePrepare$CalciteSignature.enumerable(CalcitePrepare.java:364) at org.apache.calcite.jdbc.CalciteConnectionImpl.enumerable(CalciteConnectionImpl.java:326) at org.apache.calcite.jdbc.CalciteMetaImpl._createIterable(CalciteMetaImpl.java:657) at org.apache.calcite.jdbc.CalciteMetaImpl.createIterable(CalciteMetaImpl.java:648) at org.apache.calcite.avatica.AvaticaResultSet.execute(AvaticaResultSet.java:184) at org.apache.calcite.jdbc.CalciteResultSet.execute(CalciteResultSet.java:64) at org.apache.calcite.jdbc.CalciteResultSet.execute(CalciteResultSet.java:43) at org.apache.calcite.avatica.AvaticaConnection$1.execute(AvaticaConnection.java:669) at org.apache.calcite.jdbc.CalciteMetaImpl.prepareAndExecute(CalciteMetaImpl.java:717) at org.apache.calcite.avatica.AvaticaConnection.prepareAndExecuteInternal(AvaticaConnection.java:677) at org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:157) ... 6 more Caused by: x86_64/gandiva_jni.dll was not found inside JAR. at org.apache.arrow.gandiva.evaluator.JniLoader.moveFileFromJarToTemp(JniLoader.java:100) at org.apache.arrow.gandiva.evaluator.JniLoader.loadGandivaLibraryFromJar(JniLoader.java:75) at org.apache.arrow.gandiva.evaluator.JniLoader.setupInstance(JniLoader.java:64) at org.apache.arrow.gandiva.evaluator.JniLoader.getInstance(JniLoader.java:54) at org.apache.arrow.gandiva.evaluator.JniLoader.getDefaultConfiguration(JniLoader.java:160) at org.apache.arrow.gandiva.evaluator.Projector.make(Projector.java:78) at org.apache.calcite.adapter.arrow.ArrowTable.query(ArrowTable.java:111) ... 17 more Next exception 3: [CIRCULAR REFERENCE PlaceholderException] Caused by: [CIRCULAR REFERENCE RuntimeException] {noformat} Again it continues passing on gha Windows Server (windows-latest) and fails on Windows 11... UPDATE: I looked inside {{arrow-gandiva-15.0.0.jar}} and there is such dll... There are only {{\*.so}} and {{\*.dylib}} files. was (Author: sergey nuyanzin): A couple of observations search across the internet shows that it might be JUnit5/Windows issue [https://github.com/junit-team/junit5/issues/2811] which is not fixed yet I tried to replace {{TempDir}} with {{deleteOnExit}} as mentioned in some comments of the JUnit5 issue after that it starte
[jira] [Commented] (CALCITE-6387) Calcite build while compiliation with jdk17+
[ https://issues.apache.org/jira/browse/CALCITE-6387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841634#comment-17841634 ] Sergey Nuyanzin commented on CALCITE-6387: -- yep, [~caicancai] here it is CALCITE-6390 I also added some observations there > Calcite build while compiliation with jdk17+ > > > Key: CALCITE-6387 > URL: https://issues.apache.org/jira/browse/CALCITE-6387 > Project: Calcite > Issue Type: Bug >Affects Versions: 1.36.0 >Reporter: Sergey Nuyanzin >Assignee: Sergey Nuyanzin >Priority: Major > Labels: pull-request-available > > The issue appears with newly added Arrow adapter which requires > {noformat} > --add-opens=java.base/java.nio=ALL-UNNAMED > {noformat} > could be fixed with adding > {noformat} > plugins.withType { > tasks { > configureEach { > jvmArgs("-XX:+IgnoreUnrecognizedVMOptions") > jvmArgs("--add-opens=java.base/java.nio=ALL-UNNAMED") > } > } > } > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Comment Edited] (CALCITE-6390) ArrowAdapterTest fails on Windows 11
[ https://issues.apache.org/jira/browse/CALCITE-6390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841633#comment-17841633 ] Sergey Nuyanzin edited comment on CALCITE-6390 at 4/28/24 11:20 AM: A couple of observations search across the internet shows that it might be JUnit5/Windows issue [https://github.com/junit-team/junit5/issues/2811] which is not fixed yet I tried to replace {{TempDir}} with {{deleteOnExit}} as mentioned in some comments of the JUnit5 issue after that it started to fail as {noformat} FAILURE 0.2sec, org.apache.calcite.adapter.arrow.ArrowAdapterTest > testCastDecimalToFloat() java.sql.SQLException: Error while executing SQL "select CAST(LOSAL AS FLOAT) as "extra" from SALGRADE": x86_64/gandiva_jni.dll was not found inside JAR. at org.apache.calcite.avatica.Helper.createException(Helper.java:56) at org.apache.calcite.avatica.Helper.createException(Helper.java:41) at org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:164) at org.apache.calcite.avatica.AvaticaStatement.executeQuery(AvaticaStatement.java:228) at org.apache.calcite.test.CalciteAssert.assertQuery(CalciteAssert.java:566) at org.apache.calcite.test.CalciteAssert$AssertQuery.lambda$typeIs$5(CalciteAssert.java:1554) at org.apache.calcite.test.CalciteAssert$AssertQuery.withConnection(CalciteAssert.java:1434) at org.apache.calcite.test.CalciteAssert$AssertQuery.typeIs(CalciteAssert.java:1553) at org.apache.calcite.adapter.arrow.ArrowAdapterTest.testCastDecimalToFloat(ArrowAdapterTest.java:508) Suppressed: org.apache.calcite.util.TestUtil$ExtraInformation: With materializationsEnabled=false, limit=-1 at org.apache.calcite.util.TestUtil.rethrow(TestUtil.java:389) at org.apache.calcite.test.CalciteAssert.assertQuery(CalciteAssert.java:598) ... 4 more Next exception 1: [CIRCULAR REFERENCE SQLException] Next exception 2: java.lang.RuntimeException: x86_64/gandiva_jni.dll was not found inside JAR. at org.apache.calcite.util.Util.toUnchecked(Util.java:989) at org.apache.calcite.adapter.arrow.ArrowTable.query(ArrowTable.java:113) at org.apache.calcite.jdbc.CalcitePrepare$CalciteSignature.enumerable(CalcitePrepare.java:364) at org.apache.calcite.jdbc.CalciteConnectionImpl.enumerable(CalciteConnectionImpl.java:326) at org.apache.calcite.jdbc.CalciteMetaImpl._createIterable(CalciteMetaImpl.java:657) at org.apache.calcite.jdbc.CalciteMetaImpl.createIterable(CalciteMetaImpl.java:648) at org.apache.calcite.avatica.AvaticaResultSet.execute(AvaticaResultSet.java:184) at org.apache.calcite.jdbc.CalciteResultSet.execute(CalciteResultSet.java:64) at org.apache.calcite.jdbc.CalciteResultSet.execute(CalciteResultSet.java:43) at org.apache.calcite.avatica.AvaticaConnection$1.execute(AvaticaConnection.java:669) at org.apache.calcite.jdbc.CalciteMetaImpl.prepareAndExecute(CalciteMetaImpl.java:717) at org.apache.calcite.avatica.AvaticaConnection.prepareAndExecuteInternal(AvaticaConnection.java:677) at org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:157) ... 6 more Caused by: x86_64/gandiva_jni.dll was not found inside JAR. at org.apache.arrow.gandiva.evaluator.JniLoader.moveFileFromJarToTemp(JniLoader.java:100) at org.apache.arrow.gandiva.evaluator.JniLoader.loadGandivaLibraryFromJar(JniLoader.java:75) at org.apache.arrow.gandiva.evaluator.JniLoader.setupInstance(JniLoader.java:64) at org.apache.arrow.gandiva.evaluator.JniLoader.getInstance(JniLoader.java:54) at org.apache.arrow.gandiva.evaluator.JniLoader.getDefaultConfiguration(JniLoader.java:160) at org.apache.arrow.gandiva.evaluator.Projector.make(Projector.java:78) at org.apache.calcite.adapter.arrow.ArrowTable.query(ArrowTable.java:111) ... 17 more Next exception 3: [CIRCULAR REFERENCE PlaceholderException] Caused by: [CIRCULAR REFERENCE RuntimeException] {noformat} Again it continues passing on gha Windows Server (windows-latest) and fails on Windows 11... was (Author: sergey nuyanzin): A couple of observations search across the internet shows that it might be JUnit5/Windows issue [https://github.com/junit-team/junit5/issues/2811] which is not fixed yet I tried to replace {{TempDir}} with {{deleteOnExit}} as mentioned in some comments of the JUnit5 issue after that it started to fail as {noformat} FAILURE 0.2sec, org.apache.calcite.adapter.arrow.ArrowAdapterTest > testCastDecimalToFloat() java.sql
[jira] [Comment Edited] (CALCITE-6390) ArrowAdapterTest fails on Windows 11
[ https://issues.apache.org/jira/browse/CALCITE-6390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841633#comment-17841633 ] Sergey Nuyanzin edited comment on CALCITE-6390 at 4/28/24 11:19 AM: A couple of observations search across the internet shows that it might be JUnit5/Windows issue [https://github.com/junit-team/junit5/issues/2811] which is not fixed yet I tried to replace {{TempDir}} with {{deleteOnExit}} as mentioned in some comments of the JUnit5 issue after that it started to fail as {noformat} FAILURE 0.2sec, org.apache.calcite.adapter.arrow.ArrowAdapterTest > testCastDecimalToFloat() java.sql.SQLException: Error while executing SQL "select CAST(LOSAL AS FLOAT) as "extra" from SALGRADE": x86_64/gandiva_jni.dll was not found inside JAR. at org.apache.calcite.avatica.Helper.createException(Helper.java:56) at org.apache.calcite.avatica.Helper.createException(Helper.java:41) at org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:164) at org.apache.calcite.avatica.AvaticaStatement.executeQuery(AvaticaStatement.java:228) at org.apache.calcite.test.CalciteAssert.assertQuery(CalciteAssert.java:566) at org.apache.calcite.test.CalciteAssert$AssertQuery.lambda$typeIs$5(CalciteAssert.java:1554) at org.apache.calcite.test.CalciteAssert$AssertQuery.withConnection(CalciteAssert.java:1434) at org.apache.calcite.test.CalciteAssert$AssertQuery.typeIs(CalciteAssert.java:1553) at org.apache.calcite.adapter.arrow.ArrowAdapterTest.testCastDecimalToFloat(ArrowAdapterTest.java:508) Suppressed: org.apache.calcite.util.TestUtil$ExtraInformation: With materializationsEnabled=false, limit=-1 at org.apache.calcite.util.TestUtil.rethrow(TestUtil.java:389) at org.apache.calcite.test.CalciteAssert.assertQuery(CalciteAssert.java:598) ... 4 more Next exception 1: [CIRCULAR REFERENCE SQLException] Next exception 2: java.lang.RuntimeException: x86_64/gandiva_jni.dll was not found inside JAR. at org.apache.calcite.util.Util.toUnchecked(Util.java:989) at org.apache.calcite.adapter.arrow.ArrowTable.query(ArrowTable.java:113) at org.apache.calcite.jdbc.CalcitePrepare$CalciteSignature.enumerable(CalcitePrepare.java:364) at org.apache.calcite.jdbc.CalciteConnectionImpl.enumerable(CalciteConnectionImpl.java:326) at org.apache.calcite.jdbc.CalciteMetaImpl._createIterable(CalciteMetaImpl.java:657) at org.apache.calcite.jdbc.CalciteMetaImpl.createIterable(CalciteMetaImpl.java:648) at org.apache.calcite.avatica.AvaticaResultSet.execute(AvaticaResultSet.java:184) at org.apache.calcite.jdbc.CalciteResultSet.execute(CalciteResultSet.java:64) at org.apache.calcite.jdbc.CalciteResultSet.execute(CalciteResultSet.java:43) at org.apache.calcite.avatica.AvaticaConnection$1.execute(AvaticaConnection.java:669) at org.apache.calcite.jdbc.CalciteMetaImpl.prepareAndExecute(CalciteMetaImpl.java:717) at org.apache.calcite.avatica.AvaticaConnection.prepareAndExecuteInternal(AvaticaConnection.java:677) at org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:157) ... 6 more Caused by: x86_64/gandiva_jni.dll was not found inside JAR. at org.apache.arrow.gandiva.evaluator.JniLoader.moveFileFromJarToTemp(JniLoader.java:100) at org.apache.arrow.gandiva.evaluator.JniLoader.loadGandivaLibraryFromJar(JniLoader.java:75) at org.apache.arrow.gandiva.evaluator.JniLoader.setupInstance(JniLoader.java:64) at org.apache.arrow.gandiva.evaluator.JniLoader.getInstance(JniLoader.java:54) at org.apache.arrow.gandiva.evaluator.JniLoader.getDefaultConfiguration(JniLoader.java:160) at org.apache.arrow.gandiva.evaluator.Projector.make(Projector.java:78) at org.apache.calcite.adapter.arrow.ArrowTable.query(ArrowTable.java:111) ... 17 more Next exception 3: [CIRCULAR REFERENCE PlaceholderException] Caused by: [CIRCULAR REFERENCE RuntimeException] {noformat} was (Author: sergey nuyanzin): A couple of observations search across the internet shows that it might be JUnit5/Windows issue [https://github.com/junit-team/junit5/issues/2811] which is not fixed yet I tried to replace {{TempDir}} with {{deleteOnExit}} as mentioned in some comments of the JUnit5 issue > ArrowAdapterTest fails on Windows 11 > > > Key: CALCITE-6390 > URL: https://issues.apache.org/jira/browse/CALCITE-6390 > Project: Calcite >
[jira] [Commented] (CALCITE-6390) ArrowAdapterTest fails on Windows 11
[ https://issues.apache.org/jira/browse/CALCITE-6390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841633#comment-17841633 ] Sergey Nuyanzin commented on CALCITE-6390: -- A couple of observations search across the internet shows that it might be JUnit5/Windows issue [https://github.com/junit-team/junit5/issues/2811] which is not fixed yet I tried to replace {{TempDir}} with {{deleteOnExit}} as mentioned in some comments of the JUnit5 issue > ArrowAdapterTest fails on Windows 11 > > > Key: CALCITE-6390 > URL: https://issues.apache.org/jira/browse/CALCITE-6390 > Project: Calcite > Issue Type: Bug >Reporter: Sergey Nuyanzin >Priority: Major > > That's seems somehow highlights the difference between Windows Server and non > Server > we have tests against Windows Server on gha (windows-latest) and they are > green > At the same time local tests on Windows 11 show that {{ArrowAdapterTest}} > fails like > {noformat} > FAILURE 0.0sec, org.apache.calcite.adapter.arrow.ArrowAdapterTest > > executionError > java.io.IOException: Failed to delete temp directory > D:\MyConfiguration\cancai.cai\AppData\Local\Temp\junit5105379620525559011. > The following paths could not be deleted (see suppressed exceptions for > details): , arrow > at > org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.createIOExceptionWithAttachedFailures(TempDirectory.java:350) > at > org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.close(TempDirectory.java:251) > at > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > at > org.junit.jupiter.engine.execution.ExtensionValuesStore.lambda$closeAllStoredCloseableValues$3(ExtensionValuesStore.java:68) > at > java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) > at > java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) > at java.util.ArrayList.forEach(ArrayList.java:1259) > at java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:390) > at java.util.stream.Sink$ChainedReference.end(Sink.java:258) > at > java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:483) > at > java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) > at > java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) > at > java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) > at > java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) > at > java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) > at > org.junit.jupiter.engine.execution.ExtensionValuesStore.closeAllStoredCloseableValues(ExtensionValuesStore.java:68) > at > org.junit.jupiter.engine.descriptor.AbstractExtensionContext.close(AbstractExtensionContext.java:80) > at > org.junit.jupiter.engine.execution.JupiterEngineExecutionContext.close(JupiterEngineExecutionContext.java:53) > at > org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:222) > at > org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:57) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$cleanUp$10(NodeTestTask.java:167) > at > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.cleanUp(NodeTestTask.java:167) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:98) > at > org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:185) > at > org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.invokeAll(ForkJoinPoolHierarchicalTestExecutorService.java:129) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) > at > org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) > at > org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) > at > org.junit.platform.engine.support.hierarchical.
[jira] [Created] (CALCITE-6390) ArrowAdapterTest fails on Windows 11
Sergey Nuyanzin created CALCITE-6390: Summary: ArrowAdapterTest fails on Windows 11 Key: CALCITE-6390 URL: https://issues.apache.org/jira/browse/CALCITE-6390 Project: Calcite Issue Type: Bug Reporter: Sergey Nuyanzin That's seems somehow highlights the difference between Windows Server and non Server we have tests against Windows Server on gha (windows-latest) and they are green At the same time local tests on Windows 11 show that {{ArrowAdapterTest}} fails like {noformat} FAILURE 0.0sec, org.apache.calcite.adapter.arrow.ArrowAdapterTest > executionError java.io.IOException: Failed to delete temp directory D:\MyConfiguration\cancai.cai\AppData\Local\Temp\junit5105379620525559011. The following paths could not be deleted (see suppressed exceptions for details): , arrow at org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.createIOExceptionWithAttachedFailures(TempDirectory.java:350) at org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.close(TempDirectory.java:251) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.execution.ExtensionValuesStore.lambda$closeAllStoredCloseableValues$3(ExtensionValuesStore.java:68) at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.ArrayList.forEach(ArrayList.java:1259) at java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:390) at java.util.stream.Sink$ChainedReference.end(Sink.java:258) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:483) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) at org.junit.jupiter.engine.execution.ExtensionValuesStore.closeAllStoredCloseableValues(ExtensionValuesStore.java:68) at org.junit.jupiter.engine.descriptor.AbstractExtensionContext.close(AbstractExtensionContext.java:80) at org.junit.jupiter.engine.execution.JupiterEngineExecutionContext.close(JupiterEngineExecutionContext.java:53) at org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:222) at org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:57) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$cleanUp$10(NodeTestTask.java:167) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.cleanUp(NodeTestTask.java:167) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:98) at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:185) at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.invokeAll(ForkJoinPoolHierarchicalTestExecutorService.java:129) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) Suppressed: java.nio.file.DirectoryNotEmptyException: D:\MyConfiguration\cancai.cai\AppData\Local\Temp\junit5105379620525559011 {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (CALCITE-6387) Calcite build while compiliation with jdk17+
[ https://issues.apache.org/jira/browse/CALCITE-6387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841629#comment-17841629 ] Caican Cai commented on CALCITE-6387: - [~Sergey Nuyanzin] Thanks for replicating. I think we should build a jira. I'll fix it in my spare time > Calcite build while compiliation with jdk17+ > > > Key: CALCITE-6387 > URL: https://issues.apache.org/jira/browse/CALCITE-6387 > Project: Calcite > Issue Type: Bug >Affects Versions: 1.36.0 >Reporter: Sergey Nuyanzin >Assignee: Sergey Nuyanzin >Priority: Major > Labels: pull-request-available > > The issue appears with newly added Arrow adapter which requires > {noformat} > --add-opens=java.base/java.nio=ALL-UNNAMED > {noformat} > could be fixed with adding > {noformat} > plugins.withType { > tasks { > configureEach { > jvmArgs("-XX:+IgnoreUnrecognizedVMOptions") > jvmArgs("--add-opens=java.base/java.nio=ALL-UNNAMED") > } > } > } > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (CALCITE-6387) Calcite build while compiliation with jdk17+
[ https://issues.apache.org/jira/browse/CALCITE-6387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841611#comment-17841611 ] Sergey Nuyanzin commented on CALCITE-6387: -- [~caicancai] I was able to find a laptop with Windows and tried there Surprisingly I was also able to reproduce the same issue however I was able to reproduce it both with and without the fix for this issue Thus it looks it is a separate independent issue > Calcite build while compiliation with jdk17+ > > > Key: CALCITE-6387 > URL: https://issues.apache.org/jira/browse/CALCITE-6387 > Project: Calcite > Issue Type: Bug >Affects Versions: 1.36.0 >Reporter: Sergey Nuyanzin >Assignee: Sergey Nuyanzin >Priority: Major > Labels: pull-request-available > > The issue appears with newly added Arrow adapter which requires > {noformat} > --add-opens=java.base/java.nio=ALL-UNNAMED > {noformat} > could be fixed with adding > {noformat} > plugins.withType { > tasks { > configureEach { > jvmArgs("-XX:+IgnoreUnrecognizedVMOptions") > jvmArgs("--add-opens=java.base/java.nio=ALL-UNNAMED") > } > } > } > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (CALCITE-5634) Enable GREATEST, LEAST functions in PostgreSQL library
[ https://issues.apache.org/jira/browse/CALCITE-5634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841605#comment-17841605 ] Claude Brisson commented on CALCITE-5634: - True, but whatever its name, it won't either ensure the comparability of the types, neither invoke operand types coercion, whereas ComparableOperandTypeChecker will. We'd want both for those operators. Also, GREATEST and LEAST seem absent from RexImpTable, at least in 1.36. And since UDFs cannot be variadic, the workaround is not obvious to me. > Enable GREATEST, LEAST functions in PostgreSQL library > -- > > Key: CALCITE-5634 > URL: https://issues.apache.org/jira/browse/CALCITE-5634 > Project: Calcite > Issue Type: Bug > Components: core >Affects Versions: 1.34.0 >Reporter: Dmitry Sysolyatin >Assignee: Dmitry Sysolyatin >Priority: Major > Labels: pull-request-available > Time Spent: 1h > Remaining Estimate: 0h > > The LEAST and GREATEST functions have been implemented for BigQuery and > Oracle, but haven't been added for PostgreSQL. PostgreSQL supports LEAST, > GREATEST as well [1]. > Also PostgreSQL's LEAST, GREATEST functions behave differently with NULL > values than ORACLE or BigQuery. > From PostgreSQL documentation [1]: > ??The result will be NULL only if all the expressions evaluate to NULL.?? > From BigQuery documentation [2]: > ??They return NULL if any of the input parameters is NULL.?? > [1] > [https://www.postgresql.org/docs/15/functions-conditional.html#FUNCTIONS-GREATEST-LEAST] > [2] > [https://cloud.google.com/bigquery/docs/reference/standard-sql/mathematical_functions] -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Assigned] (CALCITE-6387) Calcite build while compiliation with jdk17+
[ https://issues.apache.org/jira/browse/CALCITE-6387?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sergey Nuyanzin reassigned CALCITE-6387: Assignee: Sergey Nuyanzin > Calcite build while compiliation with jdk17+ > > > Key: CALCITE-6387 > URL: https://issues.apache.org/jira/browse/CALCITE-6387 > Project: Calcite > Issue Type: Bug >Affects Versions: 1.36.0 >Reporter: Sergey Nuyanzin >Assignee: Sergey Nuyanzin >Priority: Major > Labels: pull-request-available > > The issue appears with newly added Arrow adapter which requires > {noformat} > --add-opens=java.base/java.nio=ALL-UNNAMED > {noformat} > could be fixed with adding > {noformat} > plugins.withType { > tasks { > configureEach { > jvmArgs("-XX:+IgnoreUnrecognizedVMOptions") > jvmArgs("--add-opens=java.base/java.nio=ALL-UNNAMED") > } > } > } > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (CALCITE-6387) Calcite build while compiliation with jdk17+
[ https://issues.apache.org/jira/browse/CALCITE-6387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841600#comment-17841600 ] Sergey Nuyanzin commented on CALCITE-6387: -- It looks like a different issue with temp dir removal and not related to {{add-opens}} flags at the same time build with jdk17 on Windows passes https://github.com/apache/calcite/actions/runs/8861055229/job/24332518742?pr=3776 > Calcite build while compiliation with jdk17+ > > > Key: CALCITE-6387 > URL: https://issues.apache.org/jira/browse/CALCITE-6387 > Project: Calcite > Issue Type: Bug >Affects Versions: 1.36.0 >Reporter: Sergey Nuyanzin >Priority: Major > Labels: pull-request-available > > The issue appears with newly added Arrow adapter which requires > {noformat} > --add-opens=java.base/java.nio=ALL-UNNAMED > {noformat} > could be fixed with adding > {noformat} > plugins.withType { > tasks { > configureEach { > jvmArgs("-XX:+IgnoreUnrecognizedVMOptions") > jvmArgs("--add-opens=java.base/java.nio=ALL-UNNAMED") > } > } > } > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (CALCITE-6387) Calcite build while compiliation with jdk17+
[ https://issues.apache.org/jira/browse/CALCITE-6387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841558#comment-17841558 ] Caican Cai commented on CALCITE-6387: - {code:java} FAILURE 0.0sec, org.apache.calcite.adapter.arrow.ArrowAdapterTest > executionError java.io.IOException: Failed to delete temp directory D:\MyConfiguration\cancai.cai\AppData\Local\Temp\junit5105379620525559011. The following paths could not be deleted (see suppressed exceptions for details): , arrow at org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.createIOExceptionWithAttachedFailures(TempDirectory.java:350) at org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.close(TempDirectory.java:251) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.execution.ExtensionValuesStore.lambda$closeAllStoredCloseableValues$3(ExtensionValuesStore.java:68) at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.ArrayList.forEach(ArrayList.java:1259) at java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:390) at java.util.stream.Sink$ChainedReference.end(Sink.java:258) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:483) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) at org.junit.jupiter.engine.execution.ExtensionValuesStore.closeAllStoredCloseableValues(ExtensionValuesStore.java:68) at org.junit.jupiter.engine.descriptor.AbstractExtensionContext.close(AbstractExtensionContext.java:80) at org.junit.jupiter.engine.execution.JupiterEngineExecutionContext.close(JupiterEngineExecutionContext.java:53) at org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:222) at org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:57) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$cleanUp$10(NodeTestTask.java:167) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.cleanUp(NodeTestTask.java:167) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:98) at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:185) at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.invokeAll(ForkJoinPoolHierarchicalTestExecutorService.java:129) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) Suppressed: java.nio.file.DirectoryNotEmptyException: D:\MyConfiguration\cancai.cai\AppData\Local\Temp\junit5105379620525559011 {code} > Calcite build while compiliation with jdk17+ > > > Key: CALCITE-6387 > URL: https://issues.apache.org/jira/browse/CALCITE-6387 > Project: Calcite > Issue Type: Bug >Affects Versions: 1.36.0 >Reporter: Sergey Nuyanzin >Priority: Major > Labels: pull-request-available > > The issue appears with newly added Arrow adapter which requires > {noformat} > --add-opens=java.base/java.nio=ALL-UNNAMED > {noformat} > could be fixed with adding
[jira] [Comment Edited] (CALCITE-6387) Calcite build while compiliation with jdk17+
[ https://issues.apache.org/jira/browse/CALCITE-6387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841558#comment-17841558 ] Caican Cai edited comment on CALCITE-6387 at 4/28/24 2:05 AM: -- window build fail {code:java} FAILURE 0.0sec, org.apache.calcite.adapter.arrow.ArrowAdapterTest > executionError java.io.IOException: Failed to delete temp directory D:\MyConfiguration\cancai.cai\AppData\Local\Temp\junit5105379620525559011. The following paths could not be deleted (see suppressed exceptions for details): , arrow at org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.createIOExceptionWithAttachedFailures(TempDirectory.java:350) at org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.close(TempDirectory.java:251) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.execution.ExtensionValuesStore.lambda$closeAllStoredCloseableValues$3(ExtensionValuesStore.java:68) at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.ArrayList.forEach(ArrayList.java:1259) at java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:390) at java.util.stream.Sink$ChainedReference.end(Sink.java:258) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:483) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) at org.junit.jupiter.engine.execution.ExtensionValuesStore.closeAllStoredCloseableValues(ExtensionValuesStore.java:68) at org.junit.jupiter.engine.descriptor.AbstractExtensionContext.close(AbstractExtensionContext.java:80) at org.junit.jupiter.engine.execution.JupiterEngineExecutionContext.close(JupiterEngineExecutionContext.java:53) at org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:222) at org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.cleanUp(JupiterTestDescriptor.java:57) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$cleanUp$10(NodeTestTask.java:167) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.cleanUp(NodeTestTask.java:167) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:98) at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:185) at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.invokeAll(ForkJoinPoolHierarchicalTestExecutorService.java:129) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) Suppressed: java.nio.file.DirectoryNotEmptyException: D:\MyConfiguration\cancai.cai\AppData\Local\Temp\junit5105379620525559011 {code} was (Author: JIRAUSER302115): {code:java} FAILURE 0.0sec, org.apache.calcite.adapter.arrow.ArrowAdapterTest > executionError java.io.IOException: Failed to delete temp directory D:\MyConfiguration\cancai.cai\AppData\Local\Temp\junit5105379620525559011. The following paths could not be deleted (see suppressed exceptions for details): , arrow at org.junit.jupiter.engine.extension.TempDirectory$CloseablePath.createIOExceptionWithAttachedFailures(TempDirectory.java:350) at org.junit.jupiter.engine.extension.TempDirectory$CloseablePath
[jira] (CALCITE-6387) Calcite build while compiliation with jdk17+
[ https://issues.apache.org/jira/browse/CALCITE-6387 ] Caican Cai deleted comment on CALCITE-6387: - was (Author: JIRAUSER302115): I tried it and there was no similar problem > Calcite build while compiliation with jdk17+ > > > Key: CALCITE-6387 > URL: https://issues.apache.org/jira/browse/CALCITE-6387 > Project: Calcite > Issue Type: Bug >Affects Versions: 1.36.0 >Reporter: Sergey Nuyanzin >Priority: Major > Labels: pull-request-available > > The issue appears with newly added Arrow adapter which requires > {noformat} > --add-opens=java.base/java.nio=ALL-UNNAMED > {noformat} > could be fixed with adding > {noformat} > plugins.withType { > tasks { > configureEach { > jvmArgs("-XX:+IgnoreUnrecognizedVMOptions") > jvmArgs("--add-opens=java.base/java.nio=ALL-UNNAMED") > } > } > } > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (CALCITE-6300) Function MAP_VALUES/MAP_KEYS gives exception when mapVauleType and mapKeyType not equals map Biggest mapKeytype or mapValueType
[ https://issues.apache.org/jira/browse/CALCITE-6300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841552#comment-17841552 ] Mihai Budiu commented on CALCITE-6300: -- [~julianhyde], you may know the answer to this question which surfaced in the github discussion: For a SqlFunction, is the returnTypeInference allowed to mutate the SqlCallBinding object that it receives as argument? > Function MAP_VALUES/MAP_KEYS gives exception when mapVauleType and mapKeyType > not equals map Biggest mapKeytype or mapValueType > > > Key: CALCITE-6300 > URL: https://issues.apache.org/jira/browse/CALCITE-6300 > Project: Calcite > Issue Type: Bug > Components: core >Affects Versions: 1.36.0 >Reporter: Caican Cai >Assignee: Caican Cai >Priority: Major > Labels: pull-request-available > Fix For: 1.37.0 > > > If we run the expression below in calcite, it will cause exception: > {code:java} > map_values(map('foo', cast (2 as tinyint), 'bar', 2)) {code} > {code:java} > java.lang.ClassCastException: java.lang.Byte cannot be cast to > java.lang.Integer > at > org.apache.calcite.avatica.util.AbstractCursor$IntAccessor.getInt(AbstractCursor.java:522) >at > org.apache.calcite.avatica.util.AbstractCursor$ArrayAccessor.convertValue(AbstractCursor.java:1396) > at > org.apache.calcite.avatica.util.AbstractCursor$ArrayAccessor.getObject(AbstractCursor.java:1377) > at > org.apache.calcite.avatica.util.AbstractCursor$ArrayAccessor.getArray(AbstractCursor.java:1432) > at > org.apache.calcite.avatica.util.AbstractCursor$ArrayAccessor.getString(AbstractCursor.java:1444) > at > org.apache.calcite.avatica.AvaticaResultSet.getString(AvaticaResultSet.java:241) > at org.apache.calcite.util.JdbcTypeImpl$10.get(JdbcTypeImpl.java:112) > at org.apache.calcite.util.JdbcTypeImpl$10.get(JdbcTypeImpl.java:109) at > org.apache.calcite.sql.test.ResultCheckers.compareResultSetWithMatcher(ResultCheckers.java:248) > at > org.apache.calcite.sql.test.ResultCheckers$MatcherResultChecker.checkResult(ResultCheckers.java:321) > at > org.apache.calcite.test.SqlOperatorTest$TesterImpl.check(SqlOperatorTest.java:14300) > at org.apache.calcite.sql.test.SqlTester.check(SqlTester.java:160) at > org.apache.calcite.test.SqlOperatorFixtureImpl.lambda$checkScalar$2(SqlOperatorFixtureImpl.java:226) > at > org.apache.calcite.sql.test.AbstractSqlTester.forEachQuery(AbstractSqlTester.java:450) >at > org.apache.calcite.test.SqlOperatorFixtureImpl.checkScalar(SqlOperatorFixtureImpl.java:225) > at > org.apache.calcite.sql.test.SqlOperatorFixture.checkScalar(SqlOperatorFixture.java:229) > at > org.apache.calcite.test.SqlOperatorTest.testMapValuesFunc(SqlOperatorTest.java:7276) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) >at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) at > org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727) >at > org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60) > at > org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131) > at > org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156) > at > org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147) >at > org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86) > at > org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103) > at > org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93) > at > org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106) > at > org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64) > at > org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45) >
[jira] [Commented] (CALCITE-5634) Enable GREATEST, LEAST functions in PostgreSQL library
[ https://issues.apache.org/jira/browse/CALCITE-5634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841550#comment-17841550 ] Mihai Budiu commented on CALCITE-5634: -- According to https://issues.apache.org/jira/browse/CALCITE-6383, SameOperandTypeChecker is not named properly. > Enable GREATEST, LEAST functions in PostgreSQL library > -- > > Key: CALCITE-5634 > URL: https://issues.apache.org/jira/browse/CALCITE-5634 > Project: Calcite > Issue Type: Bug > Components: core >Affects Versions: 1.34.0 >Reporter: Dmitry Sysolyatin >Assignee: Dmitry Sysolyatin >Priority: Major > Labels: pull-request-available > Time Spent: 1h > Remaining Estimate: 0h > > The LEAST and GREATEST functions have been implemented for BigQuery and > Oracle, but haven't been added for PostgreSQL. PostgreSQL supports LEAST, > GREATEST as well [1]. > Also PostgreSQL's LEAST, GREATEST functions behave differently with NULL > values than ORACLE or BigQuery. > From PostgreSQL documentation [1]: > ??The result will be NULL only if all the expressions evaluate to NULL.?? > From BigQuery documentation [2]: > ??They return NULL if any of the input parameters is NULL.?? > [1] > [https://www.postgresql.org/docs/15/functions-conditional.html#FUNCTIONS-GREATEST-LEAST] > [2] > [https://cloud.google.com/bigquery/docs/reference/standard-sql/mathematical_functions] -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Created] (CALCITE-6389) RexBuilder.removeCastFromLiteral does not preserve semantics for decimal literals
Mihai Budiu created CALCITE-6389: Summary: RexBuilder.removeCastFromLiteral does not preserve semantics for decimal literals Key: CALCITE-6389 URL: https://issues.apache.org/jira/browse/CALCITE-6389 Project: Calcite Issue Type: Bug Components: core Affects Versions: 1.36.0 Reporter: Mihai Budiu This is a bug which I keep fixing as part of several pull requests (not yet merged), so I have decided to make it into a separate issue. The code in removeCastFromLiteral is supposed to remove casts which are useless. However, the code is too aggressive for decimal literals. In particular, this fragment: {code:java} if (toType.getSqlTypeName() == SqlTypeName.DECIMAL) { final BigDecimal decimalValue = (BigDecimal) value; return SqlTypeUtil.isValidDecimalValue(decimalValue, toType); } {code} There are at least two bugs here: - this code removes casts from literals even if they represent types such as interval - this code does not check properly that the literal can be represented by the type specified by the cast. In particular, the function SqlTypeUtil.isValidDecimalValue does not correctly consider the scale of the resulting type, and may return 'true' even when a number requires rescaling. Removing casts in such a case changes the literal's value. I have submitted a fix for this bug as part of [CALCITE-6322], but that PR hasn't been merged yet. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (CALCITE-6388) PsTableFunction throws NumberFormatException when the 'user' column has spaces
[ https://issues.apache.org/jira/browse/CALCITE-6388?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] ASF GitHub Bot updated CALCITE-6388: Labels: pull-request-available (was: ) > PsTableFunction throws NumberFormatException when the 'user' column has spaces > -- > > Key: CALCITE-6388 > URL: https://issues.apache.org/jira/browse/CALCITE-6388 > Project: Calcite > Issue Type: Bug > Components: os-adapter >Affects Versions: 1.36.0 >Reporter: Alessandro Solimando >Assignee: Alessandro Solimando >Priority: Major > Labels: pull-request-available > Fix For: 1.37.0 > > > Line parsing splits on spaces > ([PsTableFunction.java#L77|https://github.com/apache/calcite/blob/aa8d81bf1ff39e3632aeb856fc4cc247ce9727e5/plus/src/main/java/org/apache/calcite/adapter/os/PsTableFunction.java#L77]), > which breaks whenever the "user" contains at least a space. > An example output on my laptop is as follows: > {noformat} > $ ps ax -o > ppid=,pid=,pgid=,tpgid=,stat=,user=,pcpu=,pmem=,vsz=,rss=,tty=,start=,time=,uid=,ruid=,sess=,comm= > | grep startup > 1 6728 6728 0 S startup user 0.0 0.0 410266096 2528 ?? > 11Apr24 0:16.97 501 501 0 /usr/sbin/distnoted > 1 6729 6729 0 SN startup user 0.0 0.1 410332256 17616 ?? > 11Apr24 0:42.41 501 501 0 > /System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework/Versions/A/Support/mdbulkimport > 1 6750 6750 0 S startup user 0.0 0.0 410376144 13344 ?? > 11Apr24 0:40.39 501 501 0 /usr/libexec/lsd > 1 10148 10148 0 S startup user 0.0 0.0 410354816 5488 ?? > 8:26PM 0:00.31 501 501 0 /usr/libexec/containermanagerd > 1 95313 95313 0 S startup user 0.0 0.0 410357344 6576 ?? > Fri05PM 0:00.32 501 501 0 /usr/libexec/trustd{noformat} > When running the test it fails with the following stack trace: > {code:java} > Error while executing SQL "select distinct `user` from ps": while parsing > value [user] of field [pcpu] in line [ 1 6728 6728 0 S startup > user 0.0 0.0 410266096 2528 ?? 11Apr24 0:16.95 501 501 > 0 /usr/sbin/distnoted] > java.sql.SQLException: Error while executing SQL "select distinct `user` from > ps": while parsing value [user] of field [pcpu] in line [ 1 6728 6728 > 0 S startup user 0.0 0.0 410266096 2528 ?? 11Apr24 > 0:16.95 501 501 0 /usr/sbin/distnoted] > at org.apache.calcite.avatica.Helper.createException(Helper.java:56) > at org.apache.calcite.avatica.Helper.createException(Helper.java:41) > at > org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:164) > at > org.apache.calcite.avatica.AvaticaStatement.executeQuery(AvaticaStatement.java:228) > at > org.apache.calcite.test.CalciteAssert.assertQuery(CalciteAssert.java:566) > at > org.apache.calcite.test.CalciteAssert$AssertQuery.lambda$returns$1(CalciteAssert.java:1495) > at > org.apache.calcite.test.CalciteAssert$AssertQuery.withConnection(CalciteAssert.java:1434) > at > org.apache.calcite.test.CalciteAssert$AssertQuery.returns(CalciteAssert.java:1493) > at > org.apache.calcite.test.CalciteAssert$AssertQuery.returns(CalciteAssert.java:1483) > at > org.apache.calcite.adapter.os.OsAdapterTest.testPsDistinct(OsAdapterTest.java:183) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727) > at > org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60) > at > org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131) > at > org.junit.jupiter.engine.extension.SameThreadTimeoutInvocation.proceed(SameThreadTimeoutInvocation.java:45) > at > org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156) > at > org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147)
[jira] [Created] (CALCITE-6388) PsTableFunction throws NumberFormatException when the 'user' column has spaces
Alessandro Solimando created CALCITE-6388: - Summary: PsTableFunction throws NumberFormatException when the 'user' column has spaces Key: CALCITE-6388 URL: https://issues.apache.org/jira/browse/CALCITE-6388 Project: Calcite Issue Type: Bug Components: os-adapter Affects Versions: 1.36.0 Reporter: Alessandro Solimando Assignee: Alessandro Solimando Fix For: 1.37.0 Line parsing splits on spaces ([PsTableFunction.java#L77|https://github.com/apache/calcite/blob/aa8d81bf1ff39e3632aeb856fc4cc247ce9727e5/plus/src/main/java/org/apache/calcite/adapter/os/PsTableFunction.java#L77]), which breaks whenever the "user" contains at least a space. An example output on my laptop is as follows: {noformat} $ ps ax -o ppid=,pid=,pgid=,tpgid=,stat=,user=,pcpu=,pmem=,vsz=,rss=,tty=,start=,time=,uid=,ruid=,sess=,comm= | grep startup 1 6728 6728 0 S startup user 0.0 0.0 410266096 2528 ?? 11Apr24 0:16.97 501 501 0 /usr/sbin/distnoted 1 6729 6729 0 SN startup user 0.0 0.1 410332256 17616 ?? 11Apr24 0:42.41 501 501 0 /System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework/Versions/A/Support/mdbulkimport 1 6750 6750 0 S startup user 0.0 0.0 410376144 13344 ?? 11Apr24 0:40.39 501 501 0 /usr/libexec/lsd 1 10148 10148 0 S startup user 0.0 0.0 410354816 5488 ?? 8:26PM 0:00.31 501 501 0 /usr/libexec/containermanagerd 1 95313 95313 0 S startup user 0.0 0.0 410357344 6576 ?? Fri05PM 0:00.32 501 501 0 /usr/libexec/trustd{noformat} When running the test it fails with the following stack trace: {code:java} Error while executing SQL "select distinct `user` from ps": while parsing value [user] of field [pcpu] in line [ 1 6728 6728 0 S startup user 0.0 0.0 410266096 2528 ?? 11Apr24 0:16.95 501 501 0 /usr/sbin/distnoted] java.sql.SQLException: Error while executing SQL "select distinct `user` from ps": while parsing value [user] of field [pcpu] in line [ 1 6728 6728 0 S startup user 0.0 0.0 410266096 2528 ?? 11Apr24 0:16.95 501 501 0 /usr/sbin/distnoted] at org.apache.calcite.avatica.Helper.createException(Helper.java:56) at org.apache.calcite.avatica.Helper.createException(Helper.java:41) at org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:164) at org.apache.calcite.avatica.AvaticaStatement.executeQuery(AvaticaStatement.java:228) at org.apache.calcite.test.CalciteAssert.assertQuery(CalciteAssert.java:566) at org.apache.calcite.test.CalciteAssert$AssertQuery.lambda$returns$1(CalciteAssert.java:1495) at org.apache.calcite.test.CalciteAssert$AssertQuery.withConnection(CalciteAssert.java:1434) at org.apache.calcite.test.CalciteAssert$AssertQuery.returns(CalciteAssert.java:1493) at org.apache.calcite.test.CalciteAssert$AssertQuery.returns(CalciteAssert.java:1483) at org.apache.calcite.adapter.os.OsAdapterTest.testPsDistinct(OsAdapterTest.java:183) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727) at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60) at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131) at org.junit.jupiter.engine.extension.SameThreadTimeoutInvocation.proceed(SameThreadTimeoutInvocation.java:45) at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156) at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147) at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86) at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103) at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93) at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64) at org.junit.jupiter.engine.execution.InvocationI
[jira] [Commented] (CALCITE-6387) Calcite build while compiliation with jdk17+
[ https://issues.apache.org/jira/browse/CALCITE-6387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841522#comment-17841522 ] Alessandro Solimando commented on CALCITE-6387: --- Same for me, it runs fine with 11.0.21-zulu but breaks with 17.0.9-zulu, but the submitted PR fixes the issue, I approved it > Calcite build while compiliation with jdk17+ > > > Key: CALCITE-6387 > URL: https://issues.apache.org/jira/browse/CALCITE-6387 > Project: Calcite > Issue Type: Bug >Affects Versions: 1.36.0 >Reporter: Sergey Nuyanzin >Priority: Major > Labels: pull-request-available > > The issue appears with newly added Arrow adapter which requires > {noformat} > --add-opens=java.base/java.nio=ALL-UNNAMED > {noformat} > could be fixed with adding > {noformat} > plugins.withType { > tasks { > configureEach { > jvmArgs("-XX:+IgnoreUnrecognizedVMOptions") > jvmArgs("--add-opens=java.base/java.nio=ALL-UNNAMED") > } > } > } > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (CALCITE-6387) Calcite build while compiliation with jdk17+
[ https://issues.apache.org/jira/browse/CALCITE-6387?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sergey Nuyanzin updated CALCITE-6387: - Summary: Calcite build while compiliation with jdk17+ (was: Calcite build while compiliation with jdk11+) > Calcite build while compiliation with jdk17+ > > > Key: CALCITE-6387 > URL: https://issues.apache.org/jira/browse/CALCITE-6387 > Project: Calcite > Issue Type: Bug >Affects Versions: 1.36.0 >Reporter: Sergey Nuyanzin >Priority: Major > Labels: pull-request-available > > The issue appears with newly added Arrow adapter which requires > {noformat} > --add-opens=java.base/java.nio=ALL-UNNAMED > {noformat} > could be fixed with adding > {noformat} > plugins.withType { > tasks { > configureEach { > jvmArgs("-XX:+IgnoreUnrecognizedVMOptions") > jvmArgs("--add-opens=java.base/java.nio=ALL-UNNAMED") > } > } > } > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (CALCITE-6387) Calcite build while compiliation with jdk11+
[ https://issues.apache.org/jira/browse/CALCITE-6387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841507#comment-17841507 ] Sergey Nuyanzin commented on CALCITE-6387: -- Thanks for letting know [~libenchao] it seems I was wrong about jdk11 Agree it is reproduced with jdk17 I changed name and description of the issue > Calcite build while compiliation with jdk11+ > > > Key: CALCITE-6387 > URL: https://issues.apache.org/jira/browse/CALCITE-6387 > Project: Calcite > Issue Type: Bug >Affects Versions: 1.36.0 >Reporter: Sergey Nuyanzin >Priority: Major > Labels: pull-request-available > > The issue appears with newly added Arrow adapter which requires > {noformat} > --add-opens=java.base/java.nio=ALL-UNNAMED > {noformat} > could be fixed with adding > {noformat} > plugins.withType { > tasks { > configureEach { > jvmArgs("-XX:+IgnoreUnrecognizedVMOptions") > jvmArgs("--add-opens=java.base/java.nio=ALL-UNNAMED") > } > } > } > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (CALCITE-6386) Elasticsearch adapter throws NullPointerException when used with with model.json and no username, password or pathPrefix
[ https://issues.apache.org/jira/browse/CALCITE-6386?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Julian Hyde updated CALCITE-6386: - Summary: Elasticsearch adapter throws NullPointerException when used with with model.json and no username, password or pathPrefix (was: NPE when using ES adapter with model.json and no specified username, password or pathPrefix) > Elasticsearch adapter throws NullPointerException when used with with > model.json and no username, password or pathPrefix > > > Key: CALCITE-6386 > URL: https://issues.apache.org/jira/browse/CALCITE-6386 > Project: Calcite > Issue Type: Bug > Components: elasticsearch-adapter >Affects Versions: 1.36.0 >Reporter: guluo >Priority: Major > Labels: pull-request-available > > Reproduction steps: > 1 Creating model.json, according to the calcite doc about [Elasticsearch > adapter > (apache.org)|https://calcite.apache.org/docs/elasticsearch_adapter.html] > { > "version": "1.0", > "defaultSchema": "elasticsearch", > "schemas": [ > { > "type": "custom", > "name": "elasticsearch", > "factory": > "org.apache.calcite.adapter.elasticsearch.ElasticsearchSchemaFactory", > "operand": { > "coordinates": "\{'127.0.0.1': 9200}" > } > } > ] > } > > 2 Connecting es by sqlline > sqlline> !connect jdbc:calcite:model=/root/build/calcite//model.json > > 3 We would get NPE,as follow. > Caused by: java.lang.NullPointerException: at index 1 > at > com.google.common.collect.ObjectArrays.checkElementNotNull(ObjectArrays.java:232) > at > com.google.common.collect.ObjectArrays.checkElementsNotNull(ObjectArrays.java:222) > at > com.google.common.collect.ObjectArrays.checkElementsNotNull(ObjectArrays.java:216) > at > com.google.common.collect.ImmutableList.construct(ImmutableList.java:354) > at com.google.common.collect.ImmutableList.of(ImmutableList.java:128) > at > org.apache.calcite.adapter.elasticsearch.ElasticsearchSchemaFactory.connect(ElasticsearchSchemaFactory.java:202) > at > org.apache.calcite.adapter.elasticsearch.ElasticsearchSchemaFactory.create(ElasticsearchSchemaFactory.java:176) > at org.apache.calcite.model.ModelHandler.visit(ModelHandler.java:275) -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (CALCITE-6386) NPE when using ES adapter with model.json and no specified username, password or pathPrefix
[ https://issues.apache.org/jira/browse/CALCITE-6386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841501#comment-17841501 ] Julian Hyde commented on CALCITE-6386: -- I changed the summary to remove abbreviations. Please update the pr. > NPE when using ES adapter with model.json and no specified username, password > or pathPrefix > --- > > Key: CALCITE-6386 > URL: https://issues.apache.org/jira/browse/CALCITE-6386 > Project: Calcite > Issue Type: Bug > Components: elasticsearch-adapter >Affects Versions: 1.36.0 >Reporter: guluo >Priority: Major > Labels: pull-request-available > > Reproduction steps: > 1 Creating model.json, according to the calcite doc about [Elasticsearch > adapter > (apache.org)|https://calcite.apache.org/docs/elasticsearch_adapter.html] > { > "version": "1.0", > "defaultSchema": "elasticsearch", > "schemas": [ > { > "type": "custom", > "name": "elasticsearch", > "factory": > "org.apache.calcite.adapter.elasticsearch.ElasticsearchSchemaFactory", > "operand": { > "coordinates": "\{'127.0.0.1': 9200}" > } > } > ] > } > > 2 Connecting es by sqlline > sqlline> !connect jdbc:calcite:model=/root/build/calcite//model.json > > 3 We would get NPE,as follow. > Caused by: java.lang.NullPointerException: at index 1 > at > com.google.common.collect.ObjectArrays.checkElementNotNull(ObjectArrays.java:232) > at > com.google.common.collect.ObjectArrays.checkElementsNotNull(ObjectArrays.java:222) > at > com.google.common.collect.ObjectArrays.checkElementsNotNull(ObjectArrays.java:216) > at > com.google.common.collect.ImmutableList.construct(ImmutableList.java:354) > at com.google.common.collect.ImmutableList.of(ImmutableList.java:128) > at > org.apache.calcite.adapter.elasticsearch.ElasticsearchSchemaFactory.connect(ElasticsearchSchemaFactory.java:202) > at > org.apache.calcite.adapter.elasticsearch.ElasticsearchSchemaFactory.create(ElasticsearchSchemaFactory.java:176) > at org.apache.calcite.model.ModelHandler.visit(ModelHandler.java:275) -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (CALCITE-6387) Calcite build while compiliation with jdk11+
[ https://issues.apache.org/jira/browse/CALCITE-6387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841499#comment-17841499 ] Benchao Li commented on CALCITE-6387: - I can't reproduce this on jdk11(11.0.21), but jdk17(17.0.7) could reproduce it. I'm using MacOS(Ventura 13.5.2, M2). > Calcite build while compiliation with jdk11+ > > > Key: CALCITE-6387 > URL: https://issues.apache.org/jira/browse/CALCITE-6387 > Project: Calcite > Issue Type: Bug >Affects Versions: 1.36.0 >Reporter: Sergey Nuyanzin >Priority: Major > Labels: pull-request-available > > The issue appears with newly added Arrow adapter which requires > {noformat} > --add-opens=java.base/java.nio=ALL-UNNAMED > {noformat} > could be fixed with adding > {noformat} > plugins.withType { > tasks { > configureEach { > jvmArgs("-XX:+IgnoreUnrecognizedVMOptions") > jvmArgs("--add-opens=java.base/java.nio=ALL-UNNAMED") > } > } > } > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (CALCITE-6387) Calcite build while compiliation with jdk11+
[ https://issues.apache.org/jira/browse/CALCITE-6387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841495#comment-17841495 ] Sergey Nuyanzin commented on CALCITE-6387: -- by the way the issue could be reproduced on ci https://github.com/apache/calcite/actions/runs/8860612509/job/24331582362?pr=3776#step:4:371 > Calcite build while compiliation with jdk11+ > > > Key: CALCITE-6387 > URL: https://issues.apache.org/jira/browse/CALCITE-6387 > Project: Calcite > Issue Type: Bug >Affects Versions: 1.36.0 >Reporter: Sergey Nuyanzin >Priority: Major > Labels: pull-request-available > > The issue appears with newly added Arrow adapter which requires > {noformat} > --add-opens=java.base/java.nio=ALL-UNNAMED > {noformat} > could be fixed with adding > {noformat} > plugins.withType { > tasks { > configureEach { > jvmArgs("-XX:+IgnoreUnrecognizedVMOptions") > jvmArgs("--add-opens=java.base/java.nio=ALL-UNNAMED") > } > } > } > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (CALCITE-6387) Calcite build while compiliation with jdk11+
[ https://issues.apache.org/jira/browse/CALCITE-6387?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] ASF GitHub Bot updated CALCITE-6387: Labels: pull-request-available (was: ) > Calcite build while compiliation with jdk11+ > > > Key: CALCITE-6387 > URL: https://issues.apache.org/jira/browse/CALCITE-6387 > Project: Calcite > Issue Type: Bug >Affects Versions: 1.36.0 >Reporter: Sergey Nuyanzin >Priority: Major > Labels: pull-request-available > > The issue appears with newly added Arrow adapter which requires > {noformat} > --add-opens=java.base/java.nio=ALL-UNNAMED > {noformat} > could be fixed with adding > {noformat} > plugins.withType { > tasks { > configureEach { > jvmArgs("-XX:+IgnoreUnrecognizedVMOptions") > jvmArgs("--add-opens=java.base/java.nio=ALL-UNNAMED") > } > } > } > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (CALCITE-6387) Calcite build while compiliation with jdk11+
[ https://issues.apache.org/jira/browse/CALCITE-6387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841492#comment-17841492 ] Caican Cai commented on CALCITE-6387: - ok, I will submit it later > Calcite build while compiliation with jdk11+ > > > Key: CALCITE-6387 > URL: https://issues.apache.org/jira/browse/CALCITE-6387 > Project: Calcite > Issue Type: Bug >Affects Versions: 1.36.0 >Reporter: Sergey Nuyanzin >Priority: Major > > The issue appears with newly added Arrow adapter which requires > {noformat} > --add-opens=java.base/java.nio=ALL-UNNAMED > {noformat} > could be fixed with adding > {noformat} > plugins.withType { > tasks { > configureEach { > jvmArgs("-XX:+IgnoreUnrecognizedVMOptions") > jvmArgs("--add-opens=java.base/java.nio=ALL-UNNAMED") > } > } > } > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (CALCITE-6387) Calcite build while compiliation with jdk11+
[ https://issues.apache.org/jira/browse/CALCITE-6387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841490#comment-17841490 ] Sergey Nuyanzin commented on CALCITE-6387: -- Could you please elaborate the problem with paths? I was able to reproduce the issue with jdk11+ on Linux while testing It fails while testing Arrow module for me it was enough to run {noformat}./gradlew clean build{noformat} > Calcite build while compiliation with jdk11+ > > > Key: CALCITE-6387 > URL: https://issues.apache.org/jira/browse/CALCITE-6387 > Project: Calcite > Issue Type: Bug >Affects Versions: 1.36.0 >Reporter: Sergey Nuyanzin >Priority: Major > > The issue appears with newly added Arrow adapter which requires > {noformat} > --add-opens=java.base/java.nio=ALL-UNNAMED > {noformat} > could be fixed with adding > {noformat} > plugins.withType { > tasks { > configureEach { > jvmArgs("-XX:+IgnoreUnrecognizedVMOptions") > jvmArgs("--add-opens=java.base/java.nio=ALL-UNNAMED") > } > } > } > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (CALCITE-6387) Calcite build while compiliation with jdk11+
[ https://issues.apache.org/jira/browse/CALCITE-6387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841486#comment-17841486 ] Caican Cai commented on CALCITE-6387: - I tried it and there was no similar problem > Calcite build while compiliation with jdk11+ > > > Key: CALCITE-6387 > URL: https://issues.apache.org/jira/browse/CALCITE-6387 > Project: Calcite > Issue Type: Bug >Affects Versions: 1.36.0 >Reporter: Sergey Nuyanzin >Priority: Major > > The issue appears with newly added Arrow adapter which requires > {noformat} > --add-opens=java.base/java.nio=ALL-UNNAMED > {noformat} > could be fixed with adding > {noformat} > plugins.withType { > tasks { > configureEach { > jvmArgs("-XX:+IgnoreUnrecognizedVMOptions") > jvmArgs("--add-opens=java.base/java.nio=ALL-UNNAMED") > } > } > } > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Created] (CALCITE-6387) Calcite build while compiliation with jdk11+
Sergey Nuyanzin created CALCITE-6387: Summary: Calcite build while compiliation with jdk11+ Key: CALCITE-6387 URL: https://issues.apache.org/jira/browse/CALCITE-6387 Project: Calcite Issue Type: Bug Affects Versions: 1.36.0 Reporter: Sergey Nuyanzin The issue appears with newly added Arrow adapter which requires {noformat} --add-opens=java.base/java.nio=ALL-UNNAMED {noformat} could be fixed with adding {noformat} plugins.withType { tasks { configureEach { jvmArgs("-XX:+IgnoreUnrecognizedVMOptions") jvmArgs("--add-opens=java.base/java.nio=ALL-UNNAMED") } } } {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (CALCITE-6386) NPE when using ES adapter with model.json and no specified username, password or pathPrefix
[ https://issues.apache.org/jira/browse/CALCITE-6386?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] ASF GitHub Bot updated CALCITE-6386: Labels: pull-request-available (was: ) > NPE when using ES adapter with model.json and no specified username, password > or pathPrefix > --- > > Key: CALCITE-6386 > URL: https://issues.apache.org/jira/browse/CALCITE-6386 > Project: Calcite > Issue Type: Bug > Components: elasticsearch-adapter >Affects Versions: 1.36.0 >Reporter: guluo >Priority: Major > Labels: pull-request-available > > Reproduction steps: > 1 Creating model.json, according to the calcite doc about [Elasticsearch > adapter > (apache.org)|https://calcite.apache.org/docs/elasticsearch_adapter.html] > { > "version": "1.0", > "defaultSchema": "elasticsearch", > "schemas": [ > { > "type": "custom", > "name": "elasticsearch", > "factory": > "org.apache.calcite.adapter.elasticsearch.ElasticsearchSchemaFactory", > "operand": { > "coordinates": "\{'127.0.0.1': 9200}" > } > } > ] > } > > 2 Connecting es by sqlline > sqlline> !connect jdbc:calcite:model=/root/build/calcite//model.json > > 3 We would get NPE,as follow. > Caused by: java.lang.NullPointerException: at index 1 > at > com.google.common.collect.ObjectArrays.checkElementNotNull(ObjectArrays.java:232) > at > com.google.common.collect.ObjectArrays.checkElementsNotNull(ObjectArrays.java:222) > at > com.google.common.collect.ObjectArrays.checkElementsNotNull(ObjectArrays.java:216) > at > com.google.common.collect.ImmutableList.construct(ImmutableList.java:354) > at com.google.common.collect.ImmutableList.of(ImmutableList.java:128) > at > org.apache.calcite.adapter.elasticsearch.ElasticsearchSchemaFactory.connect(ElasticsearchSchemaFactory.java:202) > at > org.apache.calcite.adapter.elasticsearch.ElasticsearchSchemaFactory.create(ElasticsearchSchemaFactory.java:176) > at org.apache.calcite.model.ModelHandler.visit(ModelHandler.java:275) -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Created] (CALCITE-6386) NPE when using ES adapter with model.json and no specified username, password or pathPrefix
guluo created CALCITE-6386: -- Summary: NPE when using ES adapter with model.json and no specified username, password or pathPrefix Key: CALCITE-6386 URL: https://issues.apache.org/jira/browse/CALCITE-6386 Project: Calcite Issue Type: Bug Components: elasticsearch-adapter Affects Versions: 1.36.0 Reporter: guluo Reproduction steps: 1 Creating model.json, according to the calcite doc about [Elasticsearch adapter (apache.org)|https://calcite.apache.org/docs/elasticsearch_adapter.html] { "version": "1.0", "defaultSchema": "elasticsearch", "schemas": [ { "type": "custom", "name": "elasticsearch", "factory": "org.apache.calcite.adapter.elasticsearch.ElasticsearchSchemaFactory", "operand": { "coordinates": "\{'127.0.0.1': 9200}" } } ] } 2 Connecting es by sqlline sqlline> !connect jdbc:calcite:model=/root/build/calcite//model.json 3 We would get NPE,as follow. Caused by: java.lang.NullPointerException: at index 1 at com.google.common.collect.ObjectArrays.checkElementNotNull(ObjectArrays.java:232) at com.google.common.collect.ObjectArrays.checkElementsNotNull(ObjectArrays.java:222) at com.google.common.collect.ObjectArrays.checkElementsNotNull(ObjectArrays.java:216) at com.google.common.collect.ImmutableList.construct(ImmutableList.java:354) at com.google.common.collect.ImmutableList.of(ImmutableList.java:128) at org.apache.calcite.adapter.elasticsearch.ElasticsearchSchemaFactory.connect(ElasticsearchSchemaFactory.java:202) at org.apache.calcite.adapter.elasticsearch.ElasticsearchSchemaFactory.create(ElasticsearchSchemaFactory.java:176) at org.apache.calcite.model.ModelHandler.visit(ModelHandler.java:275) -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (CALCITE-5634) Enable GREATEST, LEAST functions in PostgreSQL library
[ https://issues.apache.org/jira/browse/CALCITE-5634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841440#comment-17841440 ] Claude Brisson commented on CALCITE-5634: - Related, so I add it here: for all the dialects, the operands type checker must be a ComparableOperandTypeChecker, not a SameOperandTypeChecker. > Enable GREATEST, LEAST functions in PostgreSQL library > -- > > Key: CALCITE-5634 > URL: https://issues.apache.org/jira/browse/CALCITE-5634 > Project: Calcite > Issue Type: Bug > Components: core >Affects Versions: 1.34.0 >Reporter: Dmitry Sysolyatin >Assignee: Dmitry Sysolyatin >Priority: Major > Labels: pull-request-available > Time Spent: 1h > Remaining Estimate: 0h > > The LEAST and GREATEST functions have been implemented for BigQuery and > Oracle, but haven't been added for PostgreSQL. PostgreSQL supports LEAST, > GREATEST as well [1]. > Also PostgreSQL's LEAST, GREATEST functions behave differently with NULL > values than ORACLE or BigQuery. > From PostgreSQL documentation [1]: > ??The result will be NULL only if all the expressions evaluate to NULL.?? > From BigQuery documentation [2]: > ??They return NULL if any of the input parameters is NULL.?? > [1] > [https://www.postgresql.org/docs/15/functions-conditional.html#FUNCTIONS-GREATEST-LEAST] > [2] > [https://cloud.google.com/bigquery/docs/reference/standard-sql/mathematical_functions] -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (CALCITE-6369) Expanding "star" gives ArrayIndexOutOfBoundsException with redundant columns and USING
[ https://issues.apache.org/jira/browse/CALCITE-6369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] James Duong updated CALCITE-6369: - Summary: Expanding "star" gives ArrayIndexOutOfBoundsException with redundant columns and USING (was: Expanding "start" gives ArrayIndexOutOfBoundsException with redundant columns and USING) > Expanding "star" gives ArrayIndexOutOfBoundsException with redundant columns > and USING > -- > > Key: CALCITE-6369 > URL: https://issues.apache.org/jira/browse/CALCITE-6369 > Project: Calcite > Issue Type: Bug > Components: core >Affects Versions: 1.36.0 >Reporter: Claude Brisson >Assignee: James Duong >Priority: Major > > The query > {code} > select r_regionkey, * from region r0 join region r1 using (r_regionkey) > {code} > produces > {code} > java.lang.ArrayIndexOutOfBoundsException: Index 14 out of bounds for length 14 > at org.apache.calcite.runtime.PairLists$ArrayImmutablePairList.get > (PairLists.java:573) > at org.apache.calcite.runtime.PairLists$ArrayImmutablePairList.get > (PairLists.java:550) > at org.apache.calcite.sql.validate.SqlValidatorImpl$Permute.permute > (SqlValidatorImpl.java:7443) > at org.apache.calcite.sql.validate.SqlValidatorImpl.expandStar > (SqlValidatorImpl.java:697) > at org.apache.calcite.sql.validate.SqlValidatorImpl.expandSelectItem > (SqlValidatorImpl.java:453) > at org.apache.calcite.sql.validate.SqlValidatorImpl.validateSelectList > (SqlValidatorImpl.java:4658) > at org.apache.calcite.sql.validate.SqlValidatorImpl.validateSelect > (SqlValidatorImpl.java:3840) > at org.apache.calcite.sql.validate.SelectNamespace.validateImpl > (SelectNamespace.java:61) > at org.apache.calcite.sql.validate.AbstractNamespace.validate > (AbstractNamespace.java:88) > at org.apache.calcite.sql.validate.SqlValidatorImpl.validateNamespace > (SqlValidatorImpl.java:1154) > at org.apache.calcite.sql.validate.SqlValidatorImpl.validateQuery > (SqlValidatorImpl.java:1125) > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Assigned] (CALCITE-6369) Expanding "start" gives ArrayIndexOutOfBoundsException with redundant columns and USING
[ https://issues.apache.org/jira/browse/CALCITE-6369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] James Duong reassigned CALCITE-6369: Assignee: James Duong > Expanding "start" gives ArrayIndexOutOfBoundsException with redundant columns > and USING > --- > > Key: CALCITE-6369 > URL: https://issues.apache.org/jira/browse/CALCITE-6369 > Project: Calcite > Issue Type: Bug > Components: core >Affects Versions: 1.36.0 >Reporter: Claude Brisson >Assignee: James Duong >Priority: Major > > The query > {code} > select r_regionkey, * from region r0 join region r1 using (r_regionkey) > {code} > produces > {code} > java.lang.ArrayIndexOutOfBoundsException: Index 14 out of bounds for length 14 > at org.apache.calcite.runtime.PairLists$ArrayImmutablePairList.get > (PairLists.java:573) > at org.apache.calcite.runtime.PairLists$ArrayImmutablePairList.get > (PairLists.java:550) > at org.apache.calcite.sql.validate.SqlValidatorImpl$Permute.permute > (SqlValidatorImpl.java:7443) > at org.apache.calcite.sql.validate.SqlValidatorImpl.expandStar > (SqlValidatorImpl.java:697) > at org.apache.calcite.sql.validate.SqlValidatorImpl.expandSelectItem > (SqlValidatorImpl.java:453) > at org.apache.calcite.sql.validate.SqlValidatorImpl.validateSelectList > (SqlValidatorImpl.java:4658) > at org.apache.calcite.sql.validate.SqlValidatorImpl.validateSelect > (SqlValidatorImpl.java:3840) > at org.apache.calcite.sql.validate.SelectNamespace.validateImpl > (SelectNamespace.java:61) > at org.apache.calcite.sql.validate.AbstractNamespace.validate > (AbstractNamespace.java:88) > at org.apache.calcite.sql.validate.SqlValidatorImpl.validateNamespace > (SqlValidatorImpl.java:1154) > at org.apache.calcite.sql.validate.SqlValidatorImpl.validateQuery > (SqlValidatorImpl.java:1125) > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (CALCITE-6373) Distinct optimization produces broken sql query
[ https://issues.apache.org/jira/browse/CALCITE-6373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841285#comment-17841285 ] Julian Hyde commented on CALCITE-6373: -- I suspect that the fix only fixes the special case of one variable. If there are two or more variables they might be re-ordered in the generated SQL. And even with one variable, the variable might be duplicated in the generated SQL. I guess it's OK to fix a special case of the bug. But the commit message should perhaps note that it is a limited fix. > Distinct optimization produces broken sql query > --- > > Key: CALCITE-6373 > URL: https://issues.apache.org/jira/browse/CALCITE-6373 > Project: Calcite > Issue Type: Bug > Components: core, jdbc-adapter >Affects Versions: 1.36.0 >Reporter: Corvin Kuebler >Priority: Major > > Can be reproduced with the following test in JDBCTests: > {code:java} > String statement = "SELECT\n" + >" DISTINCT \"case-column\"\n" + >"FROM (\n" + >" SELECT \n" + >" CASE\n" + >" WHEN CAST(? AS VARCHAR) = \"ENAME\" THEN CAST(? > AS INTEGER)\n" + >" ELSE CAST(? AS INTEGER)\n" + >" END AS \"case-column\"\n" + >" FROM \"EMP\")"; > CalciteAssert.model(JdbcTest.SCOTT_MODEL) > .query(statement) > .consumesPreparedStatement(p -> { > p.setString(1, "name"); > p.setInt(2, 2); > p.setInt(3, 1); > }) > .planHasSql(""); > {code} > Lets assume the following statement is passed through calcite: > Before: > {code:java} > SELECT > DISTINCT "case-column" > FROM >SELECT >CASE > WHEN CAST(? AS VARCHAR) = "store_name" THEN CAST(? AS INTEGER) > ELSE CAST(? AS INTEGER) > END AS "case-column" >FROM "foodmart"."store" > {code} > After: > {code:java} > SELECT >CASE > WHEN ? = "ENAME" THEN ? > ELSE ? >END AS "case-column" > FROM >"SCOTT"."EMP" > GROUP BY >CASE > WHEN ? = "ENAME" THEN ? > ELSE ? >END > {code} > The produced statement hast two issues: > 1. The missing casts (see also > https://issues.apache.org/jira/browse/CALCITE-6346) > 2. Instead of pushing the DISTINCT it is replaced with a GROUP BY. This is > usually fine *but* since the field is a case statement containing dynamic > parameters it is not. > During sql syntax evaluation the database will give an error (the field in > the select is not contained in group by). This is because the dynamic > parameters are not evaluated during sql syntax evaluation. > I think this could be fixed by adding an alias to the field in the select > clause and referencing it in the group by clause instead of duplicating the > case statement and the dynamic parameters. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (CALCITE-6383) The class SameOperandTypeChecker is incorrectly documented
[ https://issues.apache.org/jira/browse/CALCITE-6383?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841062#comment-17841062 ] Julian Hyde commented on CALCITE-6383: -- Pr looks good except than you can’t use “*” for emphasis in javadoc. It is html not markdown. > The class SameOperandTypeChecker is incorrectly documented > -- > > Key: CALCITE-6383 > URL: https://issues.apache.org/jira/browse/CALCITE-6383 > Project: Calcite > Issue Type: Bug > Components: core >Affects Versions: 1.36.0 >Reporter: Mihai Budiu >Priority: Minor > Labels: pull-request-available > > The SameOperandTypeChecker claims that it checks whether operands have the > same type (the class name suggests this, as does the JavaDoc). > {code:java} > /** > * Parameter type-checking strategy where all operand types must be the same. > */ > public class SameOperandTypeChecker implements SqlSingleOperandTypeChecker { > {code} > But the code does something this: > {code:java} > for (int i : operandList) { > if (prev >= 0) { > if (!SqlTypeUtil.isComparable(types[i], types[prev])) { > {code} > The documentation for isComparable says: > {code:java} > /** >* Returns whether two types are comparable. They need to be scalar types of >* the same family, or struct types whose fields are pairwise comparable. > {code} > Thus the class only checks that the operands have the same type *family*, not > the same *type*. > I am not sure what the right fix is, though, since changing the class name > would be a pretty big breaking change. But I suspect this confusion is a > source of a few bugs. An instance is [CALCITE-6382] -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Comment Edited] (CALCITE-6376) Filtering CTE of at least 6 columns with QUALIFY operation results in exception
[ https://issues.apache.org/jira/browse/CALCITE-6376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841036#comment-17841036 ] ShenDa edited comment on CALCITE-6376 at 4/26/24 3:37 AM: -- The problem encountered is due to the fact that when there are six or fewer elements, Calcite creates a collection called Flat6List, which implements its own compareTo method, thereby sidestepping the requirement that the elements must be Comparable. In your case, you have exactly seven columns queried, exceeding the limit of six, so it uses ComparableListImpl, which ultimately leads to this issue in your sample. I can submit a PR to help resolve the problem you are currently facing. was (Author: dadashen): The problem encountered is due to the fact that when there are six or fewer elements, Calcite creates a collection called Flat6List, which implements its own compareTo method, thereby sidestepping the requirement that the elements must be Comparable. In your case, you have exactly seven columns queried, exceeding the limit of six, so it uses ComparableListImpl, which ultimately leads to this issue in your sample. I can submit a PR to help resolve the problem you're currently facing. > Filtering CTE of at least 6 columns with QUALIFY operation results in > exception > --- > > Key: CALCITE-6376 > URL: https://issues.apache.org/jira/browse/CALCITE-6376 > Project: Calcite > Issue Type: Bug >Affects Versions: 1.36.0 >Reporter: Austin Richardson >Priority: Major > > Example query: > > {code:java} > WITH MyCTE AS ( > SELECT > column1, > column2, > column3, > column4, > column5, > column6 > FROM ( > VALUES > ('value1', 10, 5.0, 'data1', 'info1', 'test1'), > ('value2', 20, 4.0, 'data2', 'info2', 'test2'), > ('value3', 30, 3.0, 'data3', 'info3', 'test3'), > ('value4', 40, 2.0, 'data4', 'info4', 'test4'), > ('value5', 50, 1.0, 'data5', 'info5', 'test5') > ) AS t(column1, column2, column3, column4, column5, column6) > ) > SELECT * > FROM MyCTE > QUALIFY RANK() OVER (ORDER BY column3) = 1{code} > > And exception snippet: > > {code:java} > Caused by: java.lang.ClassCastException: class > org.apache.calcite.rex.RexInputRef cannot be cast to class > java.lang.Comparable (org.apache.calcite.rex.RexInputRef is in unnamed module > of loader org.springframework.boot.loader.LaunchedURLClassLoader @257f30f7; > java.lang.Comparable is in module java.base of loader 'bootstrap') > at > org.apache.calcite.runtime.FlatLists$ComparableListImpl.get(FlatLists.java:1319) > at > org.apache.calcite.runtime.FlatLists$ComparableListImpl.get(FlatLists.java:1309) > at > java.base/java.util.AbstractList$Itr.next(AbstractList.java:373){code} > > Either removing one of the columns or the QUALIFY filter results in a > successful query. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Comment Edited] (CALCITE-6376) Filtering CTE of at least 6 columns with QUALIFY operation results in exception
[ https://issues.apache.org/jira/browse/CALCITE-6376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841036#comment-17841036 ] ShenDa edited comment on CALCITE-6376 at 4/26/24 3:37 AM: -- The problem encountered is due to the fact that when there are six or fewer elements, Calcite creates a collection called Flat6List, which implements its own compareTo method, thereby sidestepping the requirement that the elements must be Comparable. In your case, you have exactly seven columns queried, exceeding the limit of six, so it uses ComparableListImpl, which ultimately leads to this issue in your sample. I can submit a PR to help resolve the problem you're currently facing. was (Author: dadashen): The problem encountered is due to the fact that when there are six or fewer elements, Calcite creates a collection called Flat6List, which implements its own compareTo method, thereby sidestepping the requirement that the elements must be Comparable. In your case, you have exactly seven columns queried, exceeding the limit of six, so it uses ComparableListImpl, which ultimately leads to this issue in your sample. I can now submit a PR to help resolve the problem you're currently facing. > Filtering CTE of at least 6 columns with QUALIFY operation results in > exception > --- > > Key: CALCITE-6376 > URL: https://issues.apache.org/jira/browse/CALCITE-6376 > Project: Calcite > Issue Type: Bug >Affects Versions: 1.36.0 >Reporter: Austin Richardson >Priority: Major > > Example query: > > {code:java} > WITH MyCTE AS ( > SELECT > column1, > column2, > column3, > column4, > column5, > column6 > FROM ( > VALUES > ('value1', 10, 5.0, 'data1', 'info1', 'test1'), > ('value2', 20, 4.0, 'data2', 'info2', 'test2'), > ('value3', 30, 3.0, 'data3', 'info3', 'test3'), > ('value4', 40, 2.0, 'data4', 'info4', 'test4'), > ('value5', 50, 1.0, 'data5', 'info5', 'test5') > ) AS t(column1, column2, column3, column4, column5, column6) > ) > SELECT * > FROM MyCTE > QUALIFY RANK() OVER (ORDER BY column3) = 1{code} > > And exception snippet: > > {code:java} > Caused by: java.lang.ClassCastException: class > org.apache.calcite.rex.RexInputRef cannot be cast to class > java.lang.Comparable (org.apache.calcite.rex.RexInputRef is in unnamed module > of loader org.springframework.boot.loader.LaunchedURLClassLoader @257f30f7; > java.lang.Comparable is in module java.base of loader 'bootstrap') > at > org.apache.calcite.runtime.FlatLists$ComparableListImpl.get(FlatLists.java:1319) > at > org.apache.calcite.runtime.FlatLists$ComparableListImpl.get(FlatLists.java:1309) > at > java.base/java.util.AbstractList$Itr.next(AbstractList.java:373){code} > > Either removing one of the columns or the QUALIFY filter results in a > successful query. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Comment Edited] (CALCITE-6376) Filtering CTE of at least 6 columns with QUALIFY operation results in exception
[ https://issues.apache.org/jira/browse/CALCITE-6376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841034#comment-17841034 ] ShenDa edited comment on CALCITE-6376 at 4/26/24 3:38 AM: -- Yep, I reproduced. And I also found the root cause of this issus. This is because Calcite has a class called ComparableListImpl, which requires its elements to implement Comparable. If elements are not comparable, then a ClassCastException will be thrown at runtime. was (Author: dadashen): Yep, I reproduced. And I also found the root cause of this issus. This is because Calcite has a class called ComparableListImpl, which requires its elements to implement Comparable. If the elements are not comparable, then a ClassCastException will be thrown at runtime. > Filtering CTE of at least 6 columns with QUALIFY operation results in > exception > --- > > Key: CALCITE-6376 > URL: https://issues.apache.org/jira/browse/CALCITE-6376 > Project: Calcite > Issue Type: Bug >Affects Versions: 1.36.0 >Reporter: Austin Richardson >Priority: Major > > Example query: > > {code:java} > WITH MyCTE AS ( > SELECT > column1, > column2, > column3, > column4, > column5, > column6 > FROM ( > VALUES > ('value1', 10, 5.0, 'data1', 'info1', 'test1'), > ('value2', 20, 4.0, 'data2', 'info2', 'test2'), > ('value3', 30, 3.0, 'data3', 'info3', 'test3'), > ('value4', 40, 2.0, 'data4', 'info4', 'test4'), > ('value5', 50, 1.0, 'data5', 'info5', 'test5') > ) AS t(column1, column2, column3, column4, column5, column6) > ) > SELECT * > FROM MyCTE > QUALIFY RANK() OVER (ORDER BY column3) = 1{code} > > And exception snippet: > > {code:java} > Caused by: java.lang.ClassCastException: class > org.apache.calcite.rex.RexInputRef cannot be cast to class > java.lang.Comparable (org.apache.calcite.rex.RexInputRef is in unnamed module > of loader org.springframework.boot.loader.LaunchedURLClassLoader @257f30f7; > java.lang.Comparable is in module java.base of loader 'bootstrap') > at > org.apache.calcite.runtime.FlatLists$ComparableListImpl.get(FlatLists.java:1319) > at > org.apache.calcite.runtime.FlatLists$ComparableListImpl.get(FlatLists.java:1309) > at > java.base/java.util.AbstractList$Itr.next(AbstractList.java:373){code} > > Either removing one of the columns or the QUALIFY filter results in a > successful query. -- This message was sent by Atlassian Jira (v8.20.10#820010)