Taras Ledkov created IGNITE-14954:
-------------------------------------
Summary: Calcite engine. MONTHNAME function fails due to null
locale
Key: IGNITE-14954
URL: https://issues.apache.org/jira/browse/IGNITE-14954
Project: Ignite
Issue Type: Improvement
Components: sql
Reporter: Taras Ledkov
The query
{{SELECT MONTHNAME(CAST('1992-05-31' AS DATE));}}
fails with exception
{code}
class org.apache.ignite.IgniteException: Unexpected exception
at
org.apache.ignite.internal.processors.query.calcite.exec.ExecutionContext.lambda$execute$0(ExecutionContext.java:244)
at
org.apache.ignite.internal.processors.query.calcite.exec.QueryTaskExecutorImpl.lambda$execute$0(QueryTaskExecutorImpl.java:68)
at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.NullPointerException: locale
at java.base/java.util.Objects.requireNonNull(Objects.java:246)
at
java.base/java.time.format.DateTimeFormatter.<init>(DateTimeFormatter.java:1421)
at
java.base/java.time.format.DateTimeFormatter.withLocale(DateTimeFormatter.java:1463)
at
org.apache.calcite.runtime.SqlFunctions.monthNameWithDate(SqlFunctions.java:2391)
at SC.execute(Unknown Source)
at
org.apache.ignite.internal.processors.query.calcite.exec.exp.ExpressionFactoryImpl$ProjectImpl.apply(ExpressionFactoryImpl.java:387)
at
org.apache.ignite.internal.processors.query.calcite.exec.rel.ProjectNode.push(ProjectNode.java:63)
at
org.apache.ignite.internal.processors.query.calcite.exec.rel.ScanNode.push(ScanNode.java:107)
at
org.apache.ignite.internal.processors.query.calcite.exec.ExecutionContext.lambda$execute$0(ExecutionContext.java:239)
... 4 more
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)