dy102 opened a new pull request, #9234: URL: https://github.com/apache/seatunnel/pull/9234
Fixes https://github.com/apache/seatunnel/issues/9197 ### Purpose of this pull request This PR addresses an issue where MaxCompute may treat timestamp values containing `"T"` (e.g., `"2024-04-25T10:15:30"`) as `NULL` during processing. - Remove `"T"` during `LocalDateTime -> String` conversion to produce `"2024-04-25 10:15"` format. ### Questions for reviewers 1. In our current implementation, converting external timestamp data into `SeaTunnelRowData` via `LocalDateTime` appears to drop the seconds (and milliseconds). 2. However, the issue’s example shows the seconds are preserved. While reviewing the existing timestamp handling, I found that LocalDateTime seems to be constructed without preserving the seconds value, even when the original timestamp includes it. I wonder if this is an intended behavior, or if I might have misunderstood the expected input/output format. ### Does this PR introduce _any_ user-facing change? ### How was this patch tested? A unit test has been added to verify the conversion behavior from TIMESTAMP to STRING format. Since the input and output types are different in this scenario (from OdpsType.TIMESTAMP to OdpsType.STRING), an additional helper method testTypeWithDifferentInputAndOutput was created instead of using the existing test methods. The test checks whether: A Timestamp value containing the "T" character (e.g., 2025-01-01T00:00:00) is properly converted by removing the "T". This helps ensure that the logic for converting timestamp values into strings is compatible with MaxCompute's expected format. ### Check list * [ ] If any new Jar binary package adding in your PR, please add License Notice according [New License Guide](https://github.com/apache/seatunnel/blob/dev/docs/en/contribution/new-license.md) * [ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/seatunnel/tree/dev/docs * [ ] If you are contributing the connector code, please check that the following files are updated: 1. Update [plugin-mapping.properties](https://github.com/apache/seatunnel/blob/dev/plugin-mapping.properties) and add new connector information in it 2. Update the pom file of [seatunnel-dist](https://github.com/apache/seatunnel/blob/dev/seatunnel-dist/pom.xml) 3. Add ci label in [label-scope-conf](https://github.com/apache/seatunnel/blob/dev/.github/workflows/labeler/label-scope-conf.yml) 4. Add e2e testcase in [seatunnel-e2e](https://github.com/apache/seatunnel/tree/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/) 5. Update connector [plugin_config](https://github.com/apache/seatunnel/blob/dev/config/plugin_config) * [ ] Update the [`release-note`](https://github.com/apache/seatunnel/blob/dev/release-note.md). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
