-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Feature][Zeta] add from_unixtime function #5462
[Feature][Zeta] add from_unixtime function #5462
Conversation
cc @rewerma |
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.
How do you test it? Could you add some test case?
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.
yes , I've already added unit test for from_unixtime
function
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.
Please add doc about this feature. https://seatunnel.apache.org/docs/2.3.3/transform-v2/sql-functions
After this PR is merged, we may need to consider adding benchmark test for the function.
...rms-v2/src/main/java/org/apache/seatunnel/transform/sql/zeta/functions/DateTimeFunction.java
Outdated
Show resolved
Hide resolved
…unixtime function and unit test
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
Seem like the code style should be fixed. Please run |
missed code formatting on sql-functions.md
|
The UT not passed. @chovy-3012 Could you check it?
|
I made a mistake on the results of this unit test on host in different time zones. |
Please resolve the conflict. |
@@ -76,6 +76,7 @@ | |||
- [Zeta] Fix cpu load problem (#4828) | |||
- [zeta] Fix the deadlock issue with JDBC driver loading (#4878) | |||
- [zeta] dynamically replace the value of the variable at runtime (#4950) | |||
- [Zeta] Add from_unixtime function (#5462) |
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.
conflict resolved
Please add e2e test case. |
add e2e test case |
The CI failed. Could you investigate it? |
Retried more than 10 times , still failed. error message as below: [INFO] Running org.apache.seatunnel.connectors.seatunnel.jdbc.JdbcAutoGenerateSQLIT
Error: Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 8.34 s <<< FAILURE! - in org.apache.seatunnel.connectors.seatunnel.jdbc.JdbcAutoGenerateSQLIT
Error: org.apache.seatunnel.connectors.seatunnel.jdbc.JdbcAutoGenerateSQLIT Time elapsed: 8.34 s <<< ERROR!
java.util.concurrent.CompletionException: org.testcontainers.containers.ContainerLaunchException: Container startup failed
Caused by: org.testcontainers.containers.ContainerLaunchException: Container startup failed
Caused by: org.testcontainers.containers.ContainerFetchException: Can't get Docker image: RemoteDockerImage(imageName=postgres:14-alpine, imagePullPolicy=DefaultPullPolicy(), imageNameSubstitutor=org.testcontainers.utility.ImageNameSubstitutor$LogWrappedImageNameSubstitutor@489496a9)
Caused by: org.testcontainers.containers.ContainerFetchException: Failed to get Docker client for postgres:14-alpine
Caused by: com.github.dockerjava.api.exception.DockerClientException: Could not pull image: failed to register layer: write /usr/lib/libLLVM-15.so: no space left on device |
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.
+1
Hi @chovy-3012 , could you try merge from dev to retrigger CI? Thanks. |
@Hisoka-X |
@chovy-3012 |
|
Merged branch |
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
Purpose of this pull request
Check list
New License Guide
release-note
.add
from_unixtime
function.Convert the number of seconds from the UNIX epoch (1970-01-01 00:00:00 UTC) to a string representing the timestamp of that moment.