AMashenkov commented on a change in pull request #563:
URL: https://github.com/apache/ignite-3/pull/563#discussion_r790517061
##########
File path:
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/ddl/DdlCommandHandler.java
##########
@@ -111,23 +112,34 @@ private void validateCommand(DdlCommand cmd) {
/** Handles create table command. */
private void handleCreateTable(CreateTableCommand cmd) {
final PrimaryKeyDefinitionBuilder pkeyDef =
SchemaBuilders.primaryKey();
- pkeyDef.withColumns(cmd.primaryKeyColumns());
- pkeyDef.withAffinityColumns(cmd.affColumns());
+ pkeyDef.withColumns(cmd.primaryKeyColumns() == null
+ ? null
+ :
cmd.primaryKeyColumns().stream().map(IgniteObjectName::unparseName).collect(Collectors.toList()));
Review comment:
```suggestion
pkeyDef.withColumns(quoteNames(cmd.primaryKeyColumns())
...
List<String> quoteNames(List<String> names) {
if (names == null)
return null;
List<String> quoted = new ArrayList(names.size());
for (String n : names) {
....
}
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]