Skip to content

Support datatype cast for insert api same as insert into sql #15015

Closed

Description

@zhuqi-lucas

Is your feature request related to a problem or challenge?

Now insert into sql we will automatically case the datatype to consistent with the table datatype, we'd better to support datatype cast for insert api also. So we will make the insert into behaviour consistent.

Details code for sql way for insert into:

The code here:

.cast_to(target_field.data_type(), source.schema())?

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

Activity

  1. zhuqi-lucas commented on Mar 5, 2025

    @zhuqi-lucas
    ContributorAuthor

    take

  2. alamb commented on Mar 5, 2025

    @alamb
    Contributor

    makes sense to me -- thank you @zhuqi-lucas

  3. zhuqi-lucas commented on Mar 8, 2025

    @zhuqi-lucas
    ContributorAuthor

    Thank you @alamb for confirming, submitted the PR to fix it.
    #15091

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions