From 89f256ff155879e035fcff6fe8455038606b820a Mon Sep 17 00:00:00 2001 From: niu niu Date: Wed, 18 Oct 2023 10:09:51 +0800 Subject: [PATCH] Change format code --- .../optimizer/metadata/schema/SQLFederationTable.java | 2 +- .../optimizer/operator/physical/EnumerableModify.java | 4 ++-- .../planner/rule/converter/EnumerableModifyConverterRule.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/metadata/schema/SQLFederationTable.java b/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/metadata/schema/SQLFederationTable.java index b7a3d4c0dd524..b580026638985 100644 --- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/metadata/schema/SQLFederationTable.java +++ b/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/metadata/schema/SQLFederationTable.java @@ -135,7 +135,7 @@ public Statistic getStatistic() { @Override public Collection getModifiableCollection() { - return null; + throw new UnsupportedOperationException(); } @Override diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/operator/physical/EnumerableModify.java b/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/operator/physical/EnumerableModify.java index a35fd14ca6f97..458adb81ce807 100644 --- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/operator/physical/EnumerableModify.java +++ b/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/operator/physical/EnumerableModify.java @@ -46,7 +46,7 @@ public RelNode copy(final RelTraitSet traitSet, final List inputs) { @Override public Result implement(final EnumerableRelImplementor implementor, final Prefer prefer) { - // TODO generate delete statements based on the data set and related table information. - return null; + // TODO generate modification statements based on dataset and related table information. + throw new UnsupportedOperationException(); } } diff --git a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/planner/rule/converter/EnumerableModifyConverterRule.java b/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/planner/rule/converter/EnumerableModifyConverterRule.java index ed384cfbaf23e..b12378e97c2f2 100644 --- a/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/planner/rule/converter/EnumerableModifyConverterRule.java +++ b/kernel/sql-federation/optimizer/src/main/java/org/apache/shardingsphere/sqlfederation/optimizer/planner/rule/converter/EnumerableModifyConverterRule.java @@ -43,7 +43,7 @@ private EnumerableModifyConverterRule(final Config config) { public RelNode convert(final RelNode rel) { TableModify modify = (TableModify) rel; ModifiableTable modifiableTable = modify.getTable().unwrap(ModifiableTable.class); - if (modifiableTable == null) { + if (null == modifiableTable) { return null; } else { RelTraitSet traitSet = modify.getTraitSet().replace(EnumerableConvention.INSTANCE);