You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Sergey Nuyanzin (Jira)" <ji...@apache.org> on 2021/12/07 12:33:00 UTC

[jira] [Created] (FLINK-25215) ISODOW for timestamps with timezones fails with Invalid start unit

Sergey Nuyanzin created FLINK-25215:
---------------------------------------

             Summary: ISODOW for timestamps with timezones fails with Invalid start unit
                 Key: FLINK-25215
                 URL: https://issues.apache.org/jira/browse/FLINK-25215
             Project: Flink
          Issue Type: Bug
          Components: Table SQL / API
            Reporter: Sergey Nuyanzin


{{DECADE}} returns wrong result for timestamps with timezones and
{{ISODOW}}, {{ISOYEAR}} fail for timestamps with timezones like 
{noformat}
[ERROR] Could not execute SQL statement. Reason:
java.lang.IllegalArgumentException: Invalid start unit.
	at org.apache.flink.table.utils.DateTimeUtils.getFactor(DateTimeUtils.java:1213)
	at org.apache.flink.table.utils.DateTimeUtils.convertExtract(DateTimeUtils.java:1164)
	at org.apache.flink.table.utils.DateTimeUtils.extractFromTimestamp(DateTimeUtils.java:993)
	at StreamExecCalc$13.processElement(Unknown Source)
	at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.pushToOperator(CopyingChainingOutput.java:82)
	at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.collect(CopyingChainingOutput.java:57)
	at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.collect(CopyingChainingOutput.java:29)
	at org.apache.flink.streaming.api.operators.CountingOutput.collect(CountingOutput.java:56)
	at org.apache.flink.streaming.api.operators.CountingOutput.collect(CountingOutput.java:29)
	at org.apache.flink.streaming.api.operators.StreamSourceContexts$ManualWatermarkContext.processAndCollect(StreamSourceContexts.java:418)
	at org.apache.flink.streaming.api.operators.StreamSourceContexts$WatermarkContext.collect(StreamSourceContexts.java:513)
	at org.apache.flink.streaming.api.operators.StreamSourceContexts$SwitchingOnClose.collect(StreamSourceContexts.java:103)
	at org.apache.flink.streaming.api.functions.source.InputFormatSourceFunction.run(InputFormatSourceFunction.java:92)
	at org.apache.flink.streaming.api.operators.StreamSource.run(StreamSource.java:110)
	at org.apache.flink.streaming.api.operators.StreamSource.run(StreamSource.java:67)
	at org.apache.flink.streaming.runtime.tasks.SourceStreamTask$LegacySourceFunctionThread.run(SourceStreamTask.java:330)

{noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)