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

Support String type for AST #9672

Merged
merged 3 commits into from
Nov 16, 2023
Merged

Conversation

winningsix
Copy link
Collaborator

This is to fix #8157

String type and literal are already included in cudf.

Test is covered by existing integration test.

@winningsix
Copy link
Collaborator Author

build

1 similar comment
@winningsix
Copy link
Collaborator Author

build

@winningsix winningsix changed the title Support String type for AST [WIP] Support String type for AST Nov 10, 2023
@winningsix winningsix changed the title [WIP] Support String type for AST Support String type for AST Nov 10, 2023
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.

Just a nit that might be nice to have as a follow on issue. But I don't want this to go in until rapidsai/cudf#14397 is fixed or we risk possible data corruption.

@@ -734,6 +734,7 @@ case class GpuLiteral (value: Any, dataType: DataType) extends GpuLeafExpression
case LongType => ast.Literal.ofLong(value.asInstanceOf[java.lang.Long])
case FloatType => ast.Literal.ofFloat(value.asInstanceOf[java.lang.Float])
case DoubleType => ast.Literal.ofDouble(value.asInstanceOf[java.lang.Double])
case StringType => ast.Literal.ofString(value.asInstanceOf[UTF8String].toString)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I filed rapidsai/cudf#14397 related to this. It might be nice to have a follow on issue where we don't bother to go from UTF8String -> Java String (in UCS2) -> UTF8-byte array. We could just get the byte array from UTF8String and pass it directly to the Literal without any transcosing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Filed a PR addressing this in cudf side. rapidsai/cudf#14402

@winningsix
Copy link
Collaborator Author

build

@winningsix winningsix merged commit 6769b28 into NVIDIA:branch-23.12 Nov 16, 2023
37 checks passed
@winningsix winningsix deleted the aststr branch November 16, 2023 13:32
@sameerz sameerz added the feature request New feature or request label Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEA] Add string comparison to AST expressions
4 participants