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

Throw copy exception when num of columns in files are not matched with num of properties in table schema #1738

Closed
ray6080 opened this issue Jun 29, 2023 · 2 comments · Fixed by #1767

Comments

@ray6080
Copy link
Contributor

ray6080 commented Jun 29, 2023

We should throw an exception when the num of columns in files are not expected, i.e., not matched with the num of properties defined in table schema.

@acquamarin
Copy link
Collaborator

I think the arrow parser will throw an exception if the number of columns doesn't match:
e.g.
EXPECTED ERROR: Copy exception: Invalid: CSV parse error: Expected 3 columns, got 15: 0,Alice,1,true,false,35,5.0,1900-01-01,2011-08-20 11:25:30Z+00:00,3 years 2 days 13 hours 2 minu ...

@LowLevelMahn
Copy link

I think the arrow parser will throw an exception if the number of columns doesn't match

but the table schema should be valid before - i wouldn't rely on the implementation detail of arrow here
especially when there were (if im correct) talks to remove the arrow dependency someday

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants