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

Load data error #8307

Closed
Donxiaohao opened this issue Aug 29, 2024 · 5 comments · Fixed by dolthub/go-mysql-server#2656
Closed

Load data error #8307

Donxiaohao opened this issue Aug 29, 2024 · 5 comments · Fixed by dolthub/go-mysql-server#2656
Assignees
Labels
correctness We don't return the same result as MySQL customer issue enhancement New feature or request

Comments

@Donxiaohao
Copy link

mysql version 14.14
dolt version 1.42.11
image
When I follow the official recommendation to batch import and use the load data command,I encountered the error shown above.
image
The same command is executed normally in mysql
image
Looking at the error message, the problem lies in the set, but the official website syntax description is supported.
I think this is a bug,

@timsehn
Copy link
Contributor

timsehn commented Aug 29, 2024

This looks like we don't support SET syntax in our LOAD DATA. @jycor will look into this today. It may be easy to supportor it may take a few days.

@zachmu
Copy link
Member

zachmu commented Sep 11, 2024

@jycor can you summarize what's left to do on this one?

@jycor
Copy link
Contributor

jycor commented Sep 11, 2024

The two linked PRs (dolthub/go-mysql-server#2653 and dolthub/vitess#362) add support for the SET clause in LOAD DATA statements, so we're able to assign column values during a LOAD DATA.

However, we are missing support for assigning user variables within a LOAD DATA query.
For example:

LOAD DATA INFILE <file_path> INTO TABLE t (i, j, @k) set k = concat('123', @k);

I'm currently working adding this.
Hopefully, will have something by the end of the week.

@jycor
Copy link
Contributor

jycor commented Sep 12, 2024

Hey @Donxiaohao, thanks for making this issue!
We've managed to support the features requested for LOAD DATA.

The fix is making its way to main, and we will have a release out for you later this week!
Please let us know if run into any more issues.

@Donxiaohao
Copy link
Author

@jycor Thank you so much , I will try

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
correctness We don't return the same result as MySQL customer issue enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants