[ https://issues.apache.org/jira/browse/CALCITE-6347?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mihai Budiu resolved CALCITE-6347. ---------------------------------- Resolution: Fixed Fixed in https://github.com/apache/calcite/commit/1cfb72e905d0da9182aaf0e05496dbf5e77cf5bd > ARRAY_REPEAT with a string argument causes a compiler crash > ----------------------------------------------------------- > > Key: CALCITE-6347 > URL: https://issues.apache.org/jira/browse/CALCITE-6347 > Project: Calcite > Issue Type: Bug > Components: core > Affects Versions: 1.36.0 > Reporter: Mihai Budiu > Assignee: Mihai Budiu > Priority: Minor > Labels: pull-request-available > Fix For: 1.37.0 > > > The following SqlOperatorTest: > {code:java} > f.checkScalar("array_repeat('1', 2)", "['1', '1']", > "CHAR(1) NOT NULL ARRAY NOT NULL"); > {code} > causes a compiler error: > {code} > Error while compiling generated Java code: > ... > static final String > $L4J$C$org_apache_calcite_runtime_SqlFunctions_repeat_1_2_ = > org.apache.calcite.runtime.SqlFunctions.repeat("1", 2); > ... > at org.apache.calcite.avatica.Helper.wrap(Helper.java:37) > at > org.apache.calcite.adapter.enumerable.EnumerableInterpretable.toBindable(EnumerableInterpretable.java:128) > at > org.apache.calcite.prepare.CalcitePrepareImpl$CalcitePreparingStmt.implement(CalcitePrepareImpl.java:1171) > at org.apache.calcite.prepare.Prepare.prepareSql(Prepare.java:326) > at org.apache.calcite.prepare.Prepare.prepareSql(Prepare.java:220) > at > org.apache.calcite.prepare.CalcitePrepareImpl.prepare2_(CalcitePrepareImpl.java:666) > {code} > This happens because the "repeat" function in SqlFunctions is overloaded to > implement both ARRAY_REPEAT and REPEAT. -- This message was sent by Atlassian Jira (v8.20.10#820010)