-
Notifications
You must be signed in to change notification settings - Fork 111
fix: support more java.time inputs in timestamp parsing #4139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@bobbai00 Please review this PR. |
bobbai00
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Left few minor comments
common/workflow-core/src/main/scala/org/apache/texera/amber/core/tuple/AttributeTypeUtils.scala
Outdated
Show resolved
Hide resolved
common/workflow-core/src/main/scala/org/apache/texera/amber/core/tuple/AttributeTypeUtils.scala
Outdated
Show resolved
Hide resolved
common/workflow-core/src/main/scala/org/apache/texera/amber/core/tuple/AttributeTypeUtils.scala
Outdated
Show resolved
Hide resolved
common/workflow-core/src/main/scala/org/apache/texera/amber/core/tuple/AttributeTypeUtils.scala
Outdated
Show resolved
Hide resolved
common/workflow-core/src/main/scala/org/apache/texera/amber/core/tuple/AttributeTypeUtils.scala
Outdated
Show resolved
Hide resolved
...workflow-core/src/test/scala/org/apache/texera/amber/core/tuple/AttributeTypeUtilsSpec.scala
Outdated
Show resolved
Hide resolved
|
Thanks. Done. |
|
@bobbai00 Can we merge this PR now? |
|
@chenlica can you approve the workflows to run? |
|
@carloea2 There is a failed check. Please look into it. |
|
It should be fine now.. |
|
@chenlica Done. |
|
@carloea2 Please mention the related issue and close that issue as well. |
|
I do not have permission to close issues, can you do that? thanks I also added the issue to the PR description. |
|
I closed the issue. |
What changes were proposed in this PR?
Added support in
parseTimestamp(fieldValue: Any)for additionaljava.timeinput types:LocalDateTime→Timestamp.valueOf(ldt)Instant→Timestamp.from(inst)OffsetDateTime→Timestamp.from(odt.toInstant)ZonedDateTime→Timestamp.from(zdt.toInstant)LocalDate→Timestamp.valueOf(ld.atStartOfDay())Any related issues, documentation, discussions?
How was this PR tested?
Added unit tests covering the new
java.timecases for timestamp parsing:LocalDateTime,Instant,OffsetDateTime,ZonedDateTime, andLocalDateAttributeTypeExceptionWas this PR authored or co-authored using generative AI tooling?
No