[ https://issues.apache.org/jira/browse/CALCITE-6145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17800265#comment-17800265 ]
SimonAlexs commented on CALCITE-6145: ------------------------------------- [~asolimando], in the mailing list of dev [d...@calcite.apache.org, past month - Apache Mail Archives|https://lists.apache.org/list.html?d...@calcite.apache.org], I didn't find the way to start or raise a new question.I tried to send an email to [d...@calcite.apache.org|mailto:d...@calcite.apache.org] directly with my QQ email(I'm chinese), but it didn't work. Must I become a committer before raising a question in mailing list? > Function 'TRIM' without parameters throw NullPointerException > ------------------------------------------------------------- > > Key: CALCITE-6145 > URL: https://issues.apache.org/jira/browse/CALCITE-6145 > Project: Calcite > Issue Type: Bug > Components: core > Affects Versions: 1.36.0 > Reporter: SimonAlexs > Priority: Major > Labels: newbie > > When use sql as follow, trim without parameters, it throws > java.lang.NullPointerException. > {code:java} > select trim(){code} > Error position is org.apache.calcite.sql.SqlOperator#constructArgNameList. > Source code is below. Line 5 "operand.getKind()" results in this exception. > > {code:java} > protected @Nullable List<String> constructArgNameList(SqlCall call) { > // If any arguments are named, construct a map. > final ImmutableList.Builder<String> nameBuilder = ImmutableList.builder(); > for (SqlNode operand : call.getOperandList()) { > if (operand.getKind() == SqlKind.ARGUMENT_ASSIGNMENT) { > final List<SqlNode> operandList = ((SqlCall) operand).getOperandList(); > nameBuilder.add(((SqlIdentifier) operandList.get(1)).getSimple()); > } > } > ImmutableList<String> argNames = nameBuilder.build(); > if (argNames.isEmpty()) { > return null; > } else { > return argNames; > } > } {code} > > Should it throw an exact description? -- This message was sent by Atlassian Jira (v8.20.10#820010)