Skip to content

Make Sqrl std library functions robust to null input #1070

@mbroecheler

Description

@mbroecheler

When epochtotimestamp gets a null value, it throws an exception. It should return null instead:

java.lang.NullPointerException: null
        at com.datasqrl.time.AbstractEpochToTimestamp.eval(AbstractEpochToTimestamp.java:20) ~[sqrl-test.jar:0.5.6]
        at StreamExecCalc$7.processElement(Unknown Source) ~[?:?]
        at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.pushToOperator(CopyingChainingOutput.java:75) ~[sqrl-test.jar:0.5.6]
        at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.collect(CopyingChainingOutput.java:50) ~[sqrl-test.jar:0.5.6]
        at org.apache.flink.streaming.runtime.tasks.ChainingOutput.collectAndCheckIfChained(ChainingOutput.java:90) ~[sqrl-test.jar:0.5.6]
        at org.apache.flink.streaming.runtime.tasks.ChainingOutput.collectAndCheckIfChained(ChainingOutput.java:40) ~[sqrl-test.jar:0.5.6]
        at org.apache.flink.streaming.runtime.tasks.BroadcastingOutputCollector.collect(BroadcastingOutputCollector.java:83) ~[sqrl-test.jar:0.5.6]
        at org.apache.flink.streaming.runtime.tasks.BroadcastingOutputCollector.collect(BroadcastingOutputCollector.java:34) ~[sqrl-test.jar:0.5.6]
        at

See AbstractEpochToTimestamp and also double check the other timestamp functions in StdTimeLibraryImpl

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Backlog

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions