Skip to content

Commit

Permalink
Fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
kokosing committed Sep 23, 2021
1 parent 2d5a550 commit 390f2fd
Showing 1 changed file with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,9 @@ protected Node visitShowCreate(ShowCreate node, Void context)
accessControl.checkCanShowCreateTable(session.toSecurityContext(), new QualifiedObjectName(catalogName.getValue(), schemaName.getValue(), tableName.getValue()));

Map<String, Object> properties = viewDefinition.get().getProperties();
Map<String, PropertyMetadata<?>> allMaterializedViewProperties = metadata.getMaterializedViewPropertyManager().getAllProperties().get(new CatalogName(catalogName.getValue()));
Map<String, PropertyMetadata<?>> allMaterializedViewProperties = metadata.getMaterializedViewPropertyManager()
.getAllProperties()
.get(new CatalogName(catalogName.getValue()));
List<Property> propertyNodes = buildProperties(objectName, Optional.empty(), INVALID_MATERIALIZED_VIEW_PROPERTY, properties, allMaterializedViewProperties);

String sql = formatSql(new CreateMaterializedView(Optional.empty(), QualifiedName.of(ImmutableList.of(catalogName, schemaName, tableName)),
Expand Down Expand Up @@ -548,7 +550,13 @@ protected Node visitShowCreate(ShowCreate node, Void context)
accessControl.checkCanShowCreateTable(session.toSecurityContext(), new QualifiedObjectName(catalogName.getValue(), schemaName.getValue(), tableName.getValue()));

CreateView.Security security = viewDefinition.get().isRunAsInvoker() ? INVOKER : DEFINER;
String sql = formatSql(new CreateView(QualifiedName.of(ImmutableList.of(catalogName, schemaName, tableName)), query, false, viewDefinition.get().getComment(), Optional.of(security))).trim();
String sql = formatSql(new CreateView(
QualifiedName.of(ImmutableList.of(catalogName, schemaName, tableName)),
query,
false,
viewDefinition.get().getComment(),
Optional.of(security)))
.trim();
return singleValueQuery("Create View", sql);
}

Expand Down Expand Up @@ -579,7 +587,12 @@ protected Node visitShowCreate(ShowCreate node, Void context)
.filter(column -> !column.isHidden())
.map(column -> {
List<Property> propertyNodes = buildProperties(targetTableName, Optional.of(column.getName()), INVALID_COLUMN_PROPERTY, column.getProperties(), allColumnProperties);
return new ColumnDefinition(new Identifier(column.getName()), toSqlType(column.getType()), column.isNullable(), propertyNodes, Optional.ofNullable(column.getComment()));
return new ColumnDefinition(
new Identifier(column.getName()),
toSqlType(column.getType()),
column.isNullable(),
propertyNodes,
Optional.ofNullable(column.getComment()));
})
.collect(toImmutableList());

Expand Down

0 comments on commit 390f2fd

Please sign in to comment.