You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2024/12/09 14:22:28 UTC

(shardingsphere) branch master updated: Code format for InsertStatementContext (#33979)

This is an automated email from the ASF dual-hosted git repository.

zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 830f9bc71d9 Code format for InsertStatementContext (#33979)
830f9bc71d9 is described below

commit 830f9bc71d934c325f1a569f9d3c0a0523afddea
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Mon Dec 9 22:22:21 2024 +0800

    Code format for InsertStatementContext (#33979)
---
 .../infra/binder/context/statement/dml/InsertStatementContext.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/context/statement/dml/InsertStatementContext.java b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/context/statement/dml/InsertStatementContext.java
index 64453d4a7af..2f48a3daada 100644
--- a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/context/statement/dml/InsertStatementContext.java
+++ b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/context/statement/dml/InsertStatementContext.java
@@ -104,7 +104,8 @@ public final class InsertStatementContext extends CommonSQLStatementContext impl
         tablesContext = new TablesContext(getAllSimpleTableSegments(), getDatabaseType(), currentDatabaseName);
         List<String> insertColumnNames = getInsertColumnNames();
         ShardingSphereSchema schema = getSchema(metaData, currentDatabaseName);
-        columnNames = containsInsertColumns() ? insertColumnNames
+        columnNames = containsInsertColumns()
+                ? insertColumnNames
                 : sqlStatement.getTable().map(optional -> schema.getVisibleColumnNames(optional.getTableName().getIdentifier().getValue())).orElseGet(Collections::emptyList);
         insertColumnNamesAndIndexes = createInsertColumnNamesAndIndexes(insertColumnNames);
         generatedKeyContext = new GeneratedKeyContextEngine(sqlStatement, schema).createGenerateKeyContext(insertColumnNamesAndIndexes, insertValueContexts, params).orElse(null);