Skip to content
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

[Hotfix][Transform][Sql] function concat_ws handle array type, avoid write [Ljava.lang.String. #8369

Merged
merged 5 commits into from
Dec 30, 2024

Conversation

sohurdc
Copy link
Contributor

@sohurdc sohurdc commented Dec 24, 2024

Purpose of this pull request

When transform from Hive to MySQL, if there are columns of array type, using the concat_ws function for transformation will result in writing [Ljava.lang.String. This is because the array type does not implement the toString method, so special handling is required. Loop through and process the array type one by one.

Does this PR introduce any user-facing change?

No

How was this patch tested?

I added unit tests, but did not add e2e tests.

Check list

@Hisoka-X Hisoka-X added the First-time contributor First-time contributor label Dec 24, 2024
public class ConcatWsFunctionTest {

@Test
public void testConcatWs() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @sohurdc ! Could you add some null value in array to test?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Hisoka-X
Hisoka-X previously approved these changes Dec 24, 2024
Copy link
Member

@Hisoka-X Hisoka-X left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @sohurdc !

add license header to file ConcatWsFunctionTest
@Hisoka-X
Copy link
Member

Please re-try failed ci.

@hailin0 hailin0 merged commit 5032c20 into apache:dev Dec 30, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants