Skip to content

Commit

Permalink
Quote column name in Phoenix CREATE TABLE statement
Browse files Browse the repository at this point in the history
Additionally, enable testColumnName test in Phoenix.
  • Loading branch information
ebyhr committed May 5, 2020
1 parent b1a2969 commit acd1cfa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ private JdbcOutputTableHandle createTable(ConnectorSession session, ConnectorTab
typeStatement += " not null";
pkNames.add(columnName);
}
columnList.add(format("%s %s", columnName, typeStatement));
columnList.add(format("%s %s", getEscapedArgument(columnName), typeStatement));
}

ImmutableList.Builder<String> tableOptions = ImmutableList.builder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,9 @@ public void testCreateSchema()
}

@Override
public void testColumnName(String columnName)
protected boolean isColumnNameRejected(Exception exception, String columnName, boolean delimited)
{
// TODO (https://github.com/prestosql/presto/issues/3466) Phoenix generally lacks quoting in underlying queries
throw new SkipException("TODO");
return columnName.equals("a\"quote");
}

@Override
Expand Down

0 comments on commit acd1cfa

Please sign in to comment.