-
Notifications
You must be signed in to change notification settings - Fork 593
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
FEAT: OmniSciDB - Refactor/Fix DDL and Client; Add temporary parameter to create_table and "force" parameter to drop_view #2086
FEAT: OmniSciDB - Refactor/Fix DDL and Client; Add temporary parameter to create_table and "force" parameter to drop_view #2086
Conversation
a7f092a
to
f11fa72
Compare
pep8speaks seems wrong here. |
f11fa72
to
cd66e62
Compare
4322243
to
db99b17
Compare
this PR is ready for review. thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adding User ddl seems out of scope. Try to lmit PRs to one thing. and do refactors in a separate PR, otherwise its very hard to tell what is going on .
@jreback as currently user ddl methods are already in the code .. what is your suggestion? open a PR to remove that from the code? |
@jreback any feedback about my previous question? #2086 (comment) |
db99b17
to
e7f6de9
Compare
ibis/tests/all/test_client.py
Outdated
] | ||
) | ||
|
||
table_name = 'test_nullable_output_{}'.format(backend.name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the purpose of this test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it checks if the table created with non-nullable field will return correctly this field as non-nullable
pls try to limit scope in PRs. |
53d96d6
to
786d6cc
Compare
15c2d3c
to
a74f9ef
Compare
Makefile
Outdated
@@ -8,7 +8,7 @@ MAKEFILE_DIR = $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST))))) | |||
# and `./ci/docker-compose.yml`) | |||
# you can use `3.6` or `3.7` for now | |||
PYTHON_VERSION := 3.6 | |||
PYTHONHASHSEED := "random" | |||
PYTHONHASHSEED := random |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
look ok, a few comments, pls rebase
@@ -649,7 +586,8 @@ def __init__( | |||
|
|||
def __del__(self): | |||
"""Close the connection when instance is deleted.""" | |||
self.close() | |||
if hasattr(self, 'con') and self.con: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why woudn't this always be true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't investigate too much the reason. but I had this issue many times playing with the client.
@@ -366,3 +371,24 @@ def get_common_spark_testing_client(data_directory, connect): | |||
df_udf_random.createOrReplaceTempView('udf_random') | |||
|
|||
return _spark_testing_client | |||
|
|||
|
|||
@pytest.fixture |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suprised we don't already have something like this, can you check (and if not, ok, follows to use this fixture would be good), can you create an issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…rename_user methods
913427d
to
766ab2f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question
@@ -989,16 +929,18 @@ def create_view(self, name, expr, database=None): | |||
statement = ddl.CreateView(name, select, database=database) | |||
self._execute(statement) | |||
|
|||
def drop_view(self, name, database=None): | |||
def drop_view(self, name, database=None, force: bool = False): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is force a common name across other back ends for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, it is a common name for operations like drop, drop_table, drop_view and drop_database across other backends
In this PR:
OmniSciDBClient.alter
, OmniSciDB doesn't support properties changing.OmniSciDBClient.__del__
methodforce
parameter toOmniSciDBClient.drop_view
OmniSciDBClient.create_table
ibis/omniscidb/dtypes.py
depends on #2117 and #2104