You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/06/10 01:34:06 UTC

[GitHub] [incubator-superset] john-bodley commented on a change in pull request #9764: feat: add replace option to hive csv upload

john-bodley commented on a change in pull request #9764:
URL: https://github.com/apache/incubator-superset/pull/9764#discussion_r437810938



##########
File path: superset/db_engine_specs/hive.py
##########
@@ -153,6 +158,20 @@ def convert_to_hive_type(col_type: str) -> str:
             )
         schema_definition = ", ".join(column_name_and_type)
 
+        # ensure table doesn't already exist
+        if (
+            if_exists == "fail"
+            and not database.get_df(

Review comment:
       Using Pandas seems a little heavy handed to simply check if the number of records is non-zero, though I guess it's fewer lines than having to use a cursor etc. and this code is probably rarely executed. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org