You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Aleksey Plekhanov (Jira)" <ji...@apache.org> on 2021/08/09 15:22:00 UTC

[jira] [Commented] (IGNITE-14954) Calcite engine. MONTHNAME, DAYNAME functions fail due to null locale

    [ https://issues.apache.org/jira/browse/IGNITE-14954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17396106#comment-17396106 ] 

Aleksey Plekhanov commented on IGNITE-14954:
--------------------------------------------

[~tledkov-gridgain], [~korlov] can you please have a look at the patch?

> Calcite engine. MONTHNAME, DAYNAME functions fail 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
>            Assignee: Aleksey Plekhanov
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> 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)