feat(isthmus): migrate to PrecisionTime / PrecisionTimestamp#721
feat(isthmus): migrate to PrecisionTime / PrecisionTimestamp#721nielspardon wants to merge 2 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
| void extract() { | ||
| test( | ||
| "extract:req_ts", | ||
| "extract:req_pts", |
There was a problem hiding this comment.
Do we still need to test req_ts?
There was a problem hiding this comment.
Round tripping function calls with the deprecated Timestamp, TimestampTZ, Time was already broken in some cases before this change. We don't have tests that certify backwards compatibility of parsing Substrait plans using deprecated types / functions.
| * @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.
|
This PR migrates isthmus to use PrecisionTime / PrecisionTimestamp instead of the deprecated Time / Timestamp types.