feat(isthmus): migrate to PrecisionTime / PrecisionTimestamp#721
feat(isthmus): migrate to PrecisionTime / PrecisionTimestamp#721bestbeforetoday merged 3 commits intosubstrait-io:mainfrom
Conversation
95e78d7 to
d686f0d
Compare
Signed-off-by: Niels Pardon <par@zurich.ibm.com>
d686f0d to
a4d3319
Compare
isthmus/src/main/java/io/substrait/isthmus/expression/ExpressionRexConverter.java
Outdated
Show resolved
Hide resolved
| * @return a PrecisionTimeLiteral with nanosecond precision representing the given time | ||
| * @see #precisionTime(boolean, long, int) for creating precision time with custom precision | ||
| */ | ||
| public static Expression.PrecisionTimeLiteral precisionTime(boolean nullable, LocalTime value) { |
There was a problem hiding this comment.
This doesn't look to be used anywhere in the codebase. If it is worth adding, it should probably have a test driving it.
| * @see #precisionTimestamp(boolean, long, int) for creating precision timestamp with custom | ||
| * precision | ||
| */ | ||
| public static Expression.PrecisionTimestampLiteral precisionTimestamp( |
There was a problem hiding this comment.
This doesn't look to be used anywhere in the codebase. If it is worth adding, it should probably have a test driving it.
dc4841c to
4e580a0
Compare
|
Thinking more on the new ExpressionCreator |
Signed-off-by: Niels Pardon <par@zurich.ibm.com>
4e580a0 to
655a26b
Compare
|
I see the build failed because some test was expecting UnsupportedOperationException instead of IllegalArgumentException. If that is existing behaviour then it seems OK to me to preserve it, even if it also seems an unintuitive and potentially confusing exception type to me. Your choice. |
I fixed all occurences. We had the same pattern also in another class. |
I think this a complex and separate topic.
|
bestbeforetoday
left a comment
There was a problem hiding this comment.
I wonder if an ExpressionCreator.precisionTimestamp overload taking a Java Instant might also be useful. Instant is effectively nanoseconds since Unix epoch UTC, similar to precision timestamp. Not necessary for this PR though.
core/src/main/java/io/substrait/expression/ExpressionCreator.java
Outdated
Show resolved
Hide resolved
03c2000 to
9a8de7a
Compare
Signed-off-by: Niels Pardon <par@zurich.ibm.com>
9a8de7a to
ae9dd84
Compare
This PR migrates isthmus to use PrecisionTime / PrecisionTimestamp instead of the deprecated Time / Timestamp types. Signed-off-by: Niels Pardon <par@zurich.ibm.com>
This PR migrates isthmus to use PrecisionTime / PrecisionTimestamp instead of the deprecated Time / Timestamp types.