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

[APIC-305] Require sql_type for every column when table_columns is provided #400

Merged
merged 15 commits into from
Aug 19, 2020

Conversation

izzy-zelichenko
Copy link
Contributor

APIC-305

Ensure data types are detected when the destination table does not exist or it is being dropped and table_columns are provided but do not contain a sql_type for every column.

Copy link
Contributor

@uttercm uttercm left a comment

Choose a reason for hiding this comment

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

Looks good, just a couple of questions. We should also request a review from someone on team sparkle since this is their AOR

civis/io/_tables.py Outdated Show resolved Hide resolved
civis/io/_tables.py Outdated Show resolved Hide resolved
Copy link
Contributor

@uttercm uttercm left a comment

Choose a reason for hiding this comment

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

One comment about the check we are using to throw the error

civis/io/_tables.py Outdated Show resolved Hide resolved
@uttercm uttercm assigned izzy-zelichenko and unassigned uttercm Aug 18, 2020
civis/io/_tables.py Outdated Show resolved Hide resolved
civis/io/_tables.py Outdated Show resolved Hide resolved
civis/io/_tables.py Outdated Show resolved Hide resolved
civis/io/_tables.py Outdated Show resolved Hide resolved
civis/io/_tables.py Outdated Show resolved Hide resolved
civis/tests/test_io.py Outdated Show resolved Hide resolved
civis/tests/test_io.py Outdated Show resolved Hide resolved
civis/tests/test_io.py Outdated Show resolved Hide resolved
civis/tests/test_io.py Outdated Show resolved Hide resolved
civis/tests/test_io.py Outdated Show resolved Hide resolved
@jkulzick jkulzick removed their assignment Aug 18, 2020
- Fix tests
- Use snake case
civis/io/_tables.py Outdated Show resolved Hide resolved
civis/io/_tables.py Outdated Show resolved Hide resolved
@izzy-zelichenko
Copy link
Contributor Author

We now have a test for every case when table_columns are provided

civis/io/_tables.py Outdated Show resolved Hide resolved
@uttercm uttercm assigned izzy-zelichenko and unassigned uttercm Aug 18, 2020
civis/io/_tables.py Outdated Show resolved Hide resolved
civis/tests/test_io.py Outdated Show resolved Hide resolved
civis/tests/test_io.py Outdated Show resolved Hide resolved
@jkulzick jkulzick removed their assignment Aug 19, 2020
- Remove duplicate test, add additional sql_type entry to test to be thorough
@izzy-zelichenko
Copy link
Contributor Author

I removed the test I previously added because I realized it was nearly identical to the test test_civis_file_to_table_table_doesnt_exist_provide_table_columns, so I just updated that existing test to have two table_columns provided to be more thorough.

Copy link
Contributor

@jkulzick jkulzick left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@uttercm uttercm left a comment

Choose a reason for hiding this comment

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

LGTM

@uttercm uttercm assigned izzy-zelichenko and unassigned uttercm Aug 19, 2020
@izzy-zelichenko izzy-zelichenko merged commit 8c8981e into master Aug 19, 2020
@izzy-zelichenko izzy-zelichenko deleted the require-sql-types branch August 19, 2020 17:04
@mheilman
Copy link
Contributor

@izzy-zelichenko, would you mind making a followup PR to add an item to the changelog for this?

@izzy-zelichenko
Copy link
Contributor Author

@mheilman Sure thing.

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 this pull request may close these issues.

None yet

4 participants