superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject [incubator-superset] branch master updated: quote hive column names (#5368)
Date Fri, 13 Jul 2018 22:51:19 GMT
This is an automated email from the ASF dual-hosted git repository.

timi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 22b7c2d  quote hive column names (#5368)
22b7c2d is described below

commit 22b7c2db623b52656109f4f1532b1b9e81d1cb76
Author: timifasubaa <30888507+timifasubaa@users.noreply.github.com>
AuthorDate: Fri Jul 13 15:51:16 2018 -0700

    quote hive column names (#5368)
---
 superset/db_engine_specs.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/superset/db_engine_specs.py b/superset/db_engine_specs.py
index 0f10d82..e2f4f70 100644
--- a/superset/db_engine_specs.py
+++ b/superset/db_engine_specs.py
@@ -1050,7 +1050,8 @@ class HiveEngineSpec(PrestoEngineSpec):
         for column_info in hive_table_schema['fields']:
             column_name_and_type.append(
                 '{} {}'.format(
-                    column_info['name'], convert_to_hive_type(column_info['type'])))
+                    "'" + column_info['name'] + "'",
+                    convert_to_hive_type(column_info['type'])))
         schema_definition = ', '.join(column_name_and_type)
 
         s3 = boto3.client('s3')


Mime
View raw message