Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.36.0
Description
The following SqlOperatorTest:
f.checkScalar("array_repeat('1', 2)", "['1', '1']", "CHAR(1) NOT NULL ARRAY NOT NULL");
causes a compiler error:
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)
This happens because the "repeat" function in SqlFunctions is overloaded to implement both ARRAY_REPEAT and REPEAT.
Attachments
Issue Links
- links to