Skip to content

Conversation

@alexjo2144
Copy link
Member

@alexjo2144 alexjo2144 commented Jan 29, 2020

Duplicates #2556 with tests added.

When hive.non-managed-table-writes-enabled and hive.non-managed-table-creates-enabled
are both set to true, external tables can be created and inserted into. This change
allows for that to be done in one step using the CREATE TABLE AS syntax.

@findepi
Copy link
Member

findepi commented Jan 30, 2020

Good job, a bunch of editorial comments.

@alexjo2144 alexjo2144 requested a review from findepi January 30, 2020 15:33
findepi
findepi previously approved these changes Jan 31, 2020
Copy link
Member

@findepi findepi left a comment

Choose a reason for hiding this comment

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

LGTM

@alexjo2144 could you please squash the commits now, without rebasing on current master?
on the command line, git rebase --interactive $(git merge-base HEAD master) should do the trick.

Copy link
Member

Choose a reason for hiding this comment

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

One more thing, I think here we should check both: writesToNonManagedTablesEnabled and createsOfNonManagedTablesEnabled

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

AFAIR that place is only for create without data (one-off create)
and this code is only for create with data (prepare-write-commit)

@alexjo2144 alexjo2144 force-pushed the create-external-table-as branch from 66d90fb to f3ef1a3 Compare January 31, 2020 16:07
@alexjo2144
Copy link
Member Author

Rebased, added the create external tables enabled check, and added a few more tests to cover the case for writes enabled but creates disabled.

…tes are enabled.

When hive.non-managed-table-writes-enabled and hive.non-managed-table-creates-enabled
are both set to true, external tables can be created and inserted into. This change
allows for that to be done in one step using the `CREATE TABLE AS` syntax.
@alexjo2144 alexjo2144 force-pushed the create-external-table-as branch from f3ef1a3 to 855a9d2 Compare January 31, 2020 16:10
@findepi findepi merged commit 7197160 into trinodb:master Feb 3, 2020
@findepi
Copy link
Member

findepi commented Feb 3, 2020

Merged, thanks!

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

Development

Successfully merging this pull request may close these issues.

3 participants