Skip to content

Should can_coerce_from promote Utf8 to LargeUtf8? #13325

@gatesn

Description

@gatesn

Describe the bug

The function can_coerce_from establishes the lossless conversions between data types.

It currently says that LargeUtf8 can be coerced into Utf8. I'm not sure this should be true?

// Any type can be coerced into strings
(Utf8 | LargeUtf8, _) => Some(type_into.clone()),

I suppose I could construct a single row that contains more than i32 bytes of string data. But it also seems generally desirable for DataFusion to promote to the large string/binary type?

To Reproduce

No response

Expected behavior

Utf8 promotes into LargeUt8, but not vice versa.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions