Skip to content

Conversation

@xudong963
Copy link
Member

Which issue does this PR close?

  • I accidentally ran into this while fixing another bug

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Yes

Are there any user-facing changes?

@github-actions github-actions bot added sqllogictest SQL Logic Tests (.slt) spark labels Jul 24, 2025
DataType::Utf8View => {
let array = as_string_view_array(array)?;

let hexed: StringArray = array
Copy link
Contributor

@zhuqi-lucas zhuqi-lucas Jul 24, 2025

Choose a reason for hiding this comment

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

Thanks @xudong963 , a minor question:

Here hexed is StringArray, why not using StringViewArray? Is it because we don't support it for the usage for this function?

It looks like the upper level spark don't support utf8view?

Copy link
Member Author

Choose a reason for hiding this comment

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

I saw that the return type of the function is String https://docs.databricks.com/gcp/en/sql/language-manual/functions/hex#returns

Copy link
Contributor

Choose a reason for hiding this comment

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

I saw that the return type of the function is String https://docs.databricks.com/gcp/en/sql/language-manual/functions/hex#returns

Ok so the upstream looks like we should return string.

@xudong963
Copy link
Member Author

thanks all

@xudong963 xudong963 merged commit 3b4eda5 into apache:main Jul 25, 2025
27 checks passed
@xudong963 xudong963 deleted the hex_utf8 branch July 25, 2025 06:49
adriangb pushed a commit to pydantic/datafusion that referenced this pull request Jul 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants