Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-14954

Calcite engine. MONTHNAME, DAYNAME functions fail due to null locale

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • sql
    • Docs Required, Release Notes Required

    Description

      The query
      SELECT MONTHNAME(CAST('1992-05-31' AS DATE));
      fails with exception

      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
      

      Attachments

        Issue Links

          Activity

            People

              alex_pl Aleksey Plekhanov
              tledkov-gridgain Taras Ledkov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h