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

Fix type convert error in format_number scalar input #10900

Merged
merged 1 commit into from
May 28, 2024

Conversation

thirtiseven
Copy link
Collaborator

Fix #10899

In doColumnar(numRows: Int, lhs: GpuScalar, rhs: GpuScalar) of GpuFormatNumber we mistakenly created a GpuColumnVector with type String, so this function does not work at all because of type conversion error.

This pr fixes it and includes related Spark UT.

override def doColumnar(numRows: Int, lhs: GpuScalar, rhs: GpuScalar): ColumnVector = {
-    withResource(GpuColumnVector.from(lhs, numRows, dataType)) { col => // dataType was always StringType
+    withResource(GpuColumnVector.from(lhs, numRows, lhs.dataType)) { col =>
      doColumnar(col, rhs)
    }
  }

@thirtiseven thirtiseven self-assigned this May 27, 2024
@thirtiseven
Copy link
Collaborator Author

build

@sameerz sameerz added the bug Something isn't working label May 28, 2024
@thirtiseven thirtiseven merged commit d2a6e38 into NVIDIA:branch-24.06 May 28, 2024
45 checks passed
@thirtiseven thirtiseven deleted the format_number_type_fix branch May 28, 2024 22:55
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] format_number Spark UT failed because Type conversion is not allowed
3 participants