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

Add recursive type checking and fallback tests for casting array with unsupported element types to string #4449

Merged

Conversation

HaoYang670
Copy link
Collaborator

Signed-off-by: remzi 13716567376yh@gmail.com
close #4446

  1. Add recursive type checking for casting array to string.
  2. Add MapType into unsupported element types in integration tests
  3. Replace Xfail by fallback when casting unsupported types to string in integration tests

add Map to unsupported element types in IT
replace xfail by fallback when casting unsupported types to string in IT

Signed-off-by: remzi <13716567376yh@gmail.com>
@HaoYang670
Copy link
Collaborator Author

build

ARRAY + BINARY + STRUCT + MAP) +
psNote(TypeEnum.ARRAY, "The array's child type must also support being cast to " +
"the desired child type")
psNote(TypeEnum.ARRAY, "The array's children must also support being cast to the " +
Copy link
Collaborator

Choose a reason for hiding this comment

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

The array type has only one child type. So child type is good enough.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thank you, I will fix it

@sameerz sameerz added the bug Something isn't working label Jan 1, 2022
@sameerz sameerz added this to the Dec 13 - Jan 7 milestone Jan 1, 2022
revans2
revans2 previously approved these changes Jan 3, 2022
Copy link
Collaborator

@revans2 revans2 left a comment

Choose a reason for hiding this comment

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

Great catch/fix. Just a minor nit

@@ -124,6 +124,9 @@ final class CastExprMeta[INPUT <: CastBase](
case (fromChild, toChild) =>
recursiveTagExprForGpuCheck(fromChild.dataType, toChild.dataType, depth + 1)
}
case (ArrayType(element_type, _), StringType) =>
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit element_type does not follow the convention. Could we make it elementType?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thank you, I will fix it

Signed-off-by: remzi <13716567376yh@gmail.com>
@HaoYang670
Copy link
Collaborator Author

build

@HaoYang670
Copy link
Collaborator Author

build

@revans2 revans2 merged commit 4606172 into NVIDIA:branch-22.02 Jan 4, 2022
@HaoYang670 HaoYang670 deleted the issue4446_cast_array_of_map_to_string branch January 5, 2022 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] GpuCast crashes when casting from Array with unsupportable child type
4 participants