Skip to content

Commit

Permalink
quote hive column names (apache#5368)
Browse files Browse the repository at this point in the history
  • Loading branch information
timifasubaa committed Jul 14, 2018
1 parent 19ac6e1 commit ca018c2
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
3 changes: 2 additions & 1 deletion superset/db_engine_specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1050,7 +1050,8 @@ def convert_to_hive_type(col_type):
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')
Expand Down
21 changes: 21 additions & 0 deletions superset/migrations/versions/6400c588de5e_.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
"""empty message
Revision ID: 6400c588de5e
Revises: bddc498dd179
Create Date: 2018-07-13 17:10:00.156708
"""

# revision identifiers, used by Alembic.
revision = '6400c588de5e'
down_revision = 'bddc498dd179'

from alembic import op
import sqlalchemy as sa


def upgrade():
op.add_column('dbs', sa.Column('allow_csv_upload', sa.Boolean(), nullable=True))

def downgrade():
op.drop_column('dbs', 'allow_csv_upload')

0 comments on commit ca018c2

Please sign in to comment.