This is an automated email from the ASF dual-hosted git repository.
jinsongzhou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/amoro.git
The following commit(s) were added to refs/heads/master by this push:
new 45313a007 [AMORO-3691] Remove deprecated metrics and update related
logic in deprectaed dependencies (#3709)
45313a007 is described below
commit 45313a007e013841bd86a4c25ecf9886ae0067b1
Author: SalvadorRomo <[email protected]>
AuthorDate: Mon Aug 11 00:17:16 2025 -0600
[AMORO-3691] Remove deprecated metrics and update related logic in
deprectaed dependencies (#3709)
* remove deprectaed variables
* fix test case
* fix test cases
* fix test cases
* fix branch
* fix test case
---
.../optimizing/maintainer/TestSnapshotExpire.java | 19 +++----
.../maintainer/TestSnapshotExpireHive.java | 5 +-
.../amoro/properties/CatalogMetaProperties.java | 2 -
.../amoro/properties/HiveTableProperties.java | 1 -
.../org/apache/amoro/table/TableProperties.java | 39 --------------
.../apache/amoro/utils/CompatiblePropertyUtil.java | 61 ++--------------------
.../apache/amoro/catalog/BasicMixedCatalog.java | 5 +-
.../amoro/utils/TestCompatiblePropertyUtil.java | 9 +---
.../hive/utils/CompatibleHivePropertyUtil.java | 39 ++------------
.../hive/utils/TestCompatibleHivePropertyUtil.java | 14 -----
.../suites/sql/TestMixedFormatSessionCatalog.java | 5 +-
.../suites/sql/TestMixedFormatSessionCatalog.java | 5 +-
12 files changed, 25 insertions(+), 179 deletions(-)
diff --git
a/amoro-ams/src/test/java/org/apache/amoro/server/optimizing/maintainer/TestSnapshotExpire.java
b/amoro-ams/src/test/java/org/apache/amoro/server/optimizing/maintainer/TestSnapshotExpire.java
index 4d1c0a6d7..eee2a8407 100644
---
a/amoro-ams/src/test/java/org/apache/amoro/server/optimizing/maintainer/TestSnapshotExpire.java
+++
b/amoro-ams/src/test/java/org/apache/amoro/server/optimizing/maintainer/TestSnapshotExpire.java
@@ -92,7 +92,7 @@ public class TestSnapshotExpire extends ExecutorTestBase {
public void testExpireChangeTableFiles() {
Assume.assumeTrue(isKeyedTable());
KeyedTable testKeyedTable = getMixedTable().asKeyedTable();
-
testKeyedTable.updateProperties().set(TableProperties.BASE_SNAPSHOT_KEEP_MINUTES,
"0").commit();
+
testKeyedTable.updateProperties().set(TableProperties.SNAPSHOT_KEEP_DURATION,
"0").commit();
testKeyedTable.updateProperties().set(TableProperties.CHANGE_DATA_TTL,
"0").commit();
List<DataFile> s1Files = insertChangeDataFiles(testKeyedTable, 1);
long l = testKeyedTable.changeTable().currentSnapshot().timestampMillis();
@@ -212,7 +212,7 @@ public class TestSnapshotExpire extends ExecutorTestBase {
writeAndCommitBaseStore(table);
Snapshot lastSnapshot = table.currentSnapshot();
- table.updateProperties().set(TableProperties.BASE_SNAPSHOT_KEEP_MINUTES,
"0").commit();
+ table.updateProperties().set(TableProperties.SNAPSHOT_KEEP_DURATION,
"0").commit();
DefaultTableRuntime tableRuntime = Mockito.mock(DefaultTableRuntime.class);
DefaultOptimizingState optimizingState =
Mockito.mock(DefaultOptimizingState.class);
Mockito.when(tableRuntime.getOptimizingState()).thenReturn(optimizingState);
@@ -254,7 +254,7 @@ public class TestSnapshotExpire extends ExecutorTestBase {
writeAndCommitBaseStore(table);
Snapshot lastSnapshot = table.currentSnapshot();
- table.updateProperties().set(TableProperties.BASE_SNAPSHOT_KEEP_MINUTES,
"0").commit();
+ table.updateProperties().set(TableProperties.SNAPSHOT_KEEP_DURATION,
"0").commit();
DefaultTableRuntime tableRuntime = Mockito.mock(DefaultTableRuntime.class);
DefaultOptimizingState optimizingState =
Mockito.mock(DefaultOptimizingState.class);
Mockito.when(tableRuntime.getOptimizingState()).thenReturn(optimizingState);
@@ -287,7 +287,7 @@ public class TestSnapshotExpire extends ExecutorTestBase {
: getMixedTable().asUnkeyedTable();
table.newAppend().commit();
table.newAppend().commit();
- table.updateProperties().set(TableProperties.BASE_SNAPSHOT_KEEP_MINUTES,
"0").commit();
+ table.updateProperties().set(TableProperties.SNAPSHOT_KEEP_DURATION,
"0").commit();
DefaultTableRuntime tableRuntime = Mockito.mock(DefaultTableRuntime.class);
DefaultOptimizingState optimizingState =
Mockito.mock(DefaultOptimizingState.class);
@@ -332,7 +332,7 @@ public class TestSnapshotExpire extends ExecutorTestBase {
isKeyedTable()
? getMixedTable().asKeyedTable().baseTable()
: getMixedTable().asUnkeyedTable();
- table.updateProperties().set(TableProperties.BASE_SNAPSHOT_KEEP_MINUTES,
"0").commit();
+ table.updateProperties().set(TableProperties.SNAPSHOT_KEEP_DURATION,
"0").commit();
List<DataFile> dataFiles = writeAndCommitBaseStore(table);
DeleteFiles deleteFiles = table.newDelete();
@@ -356,7 +356,7 @@ public class TestSnapshotExpire extends ExecutorTestBase {
Assume.assumeTrue(isKeyedTable());
KeyedTable testKeyedTable = getMixedTable().asKeyedTable();
-
testKeyedTable.updateProperties().set(TableProperties.BASE_SNAPSHOT_KEEP_MINUTES,
"0").commit();
+
testKeyedTable.updateProperties().set(TableProperties.SNAPSHOT_KEEP_DURATION,
"0").commit();
testKeyedTable.updateProperties().set(TableProperties.CHANGE_DATA_TTL,
"0").commit();
List<DataFile> s1Files = insertChangeDataFiles(testKeyedTable, 1);
@@ -418,7 +418,7 @@ public class TestSnapshotExpire extends ExecutorTestBase {
Assume.assumeTrue(isKeyedTable());
KeyedTable testKeyedTable = getMixedTable().asKeyedTable();
BaseTable baseTable = testKeyedTable.baseTable();
-
testKeyedTable.updateProperties().set(TableProperties.BASE_SNAPSHOT_KEEP_MINUTES,
"0").commit();
+
testKeyedTable.updateProperties().set(TableProperties.SNAPSHOT_KEEP_DURATION,
"0").commit();
// commit an empty snapshot and its statistic file
baseTable.newAppend().commit();
Snapshot s1 = baseTable.currentSnapshot();
@@ -522,10 +522,7 @@ public class TestSnapshotExpire extends ExecutorTestBase {
.thenReturn(ServerTableIdentifier.of(testUnkeyedTable.id(),
getTestFormat()));
Mockito.when(tableRuntime.getOptimizingState().getOptimizingStatus())
.thenReturn(OptimizingStatus.IDLE);
- testUnkeyedTable
- .updateProperties()
- .set(TableProperties.BASE_SNAPSHOT_KEEP_MINUTES, "0")
- .commit();
+
testUnkeyedTable.updateProperties().set(TableProperties.SNAPSHOT_KEEP_DURATION,
"0").commit();
Mockito.when(tableRuntime.getTableConfiguration())
.thenReturn(TableConfigurations.parseTableConfig(testUnkeyedTable.properties()));
diff --git
a/amoro-ams/src/test/java/org/apache/amoro/server/optimizing/maintainer/TestSnapshotExpireHive.java
b/amoro-ams/src/test/java/org/apache/amoro/server/optimizing/maintainer/TestSnapshotExpireHive.java
index ef1609d5b..16539fa01 100644
---
a/amoro-ams/src/test/java/org/apache/amoro/server/optimizing/maintainer/TestSnapshotExpireHive.java
+++
b/amoro-ams/src/test/java/org/apache/amoro/server/optimizing/maintainer/TestSnapshotExpireHive.java
@@ -85,10 +85,7 @@ public class TestSnapshotExpireHive extends
TestSnapshotExpire {
? getMixedTable().asKeyedTable().baseTable().newDelete()
: getMixedTable().asUnkeyedTable().newDelete();
- getMixedTable()
- .updateProperties()
- .set(TableProperties.BASE_SNAPSHOT_KEEP_MINUTES, "0")
- .commit();
+
getMixedTable().updateProperties().set(TableProperties.SNAPSHOT_KEEP_DURATION,
"0").commit();
getMixedTable().updateProperties().set(TableProperties.CHANGE_DATA_TTL,
"0").commit();
for (DataFile hiveFile : hiveFiles) {
diff --git
a/amoro-common/src/main/java/org/apache/amoro/properties/CatalogMetaProperties.java
b/amoro-common/src/main/java/org/apache/amoro/properties/CatalogMetaProperties.java
index 906a3613b..d40d1cfc5 100644
---
a/amoro-common/src/main/java/org/apache/amoro/properties/CatalogMetaProperties.java
+++
b/amoro-common/src/main/java/org/apache/amoro/properties/CatalogMetaProperties.java
@@ -47,8 +47,6 @@ public class CatalogMetaProperties {
public static final String AUTH_CONFIGS_VALUE_TYPE_AK_SK = "ak/sk";
public static final String AUTH_CONFIGS_VALUE_TYPE_CUSTOM = "custom";
- // Deprecated from version v0.4.0, use KEY_WAREHOUSE
- @Deprecated public static final String KEY_WAREHOUSE_DIR = "warehouse.dir";
public static final String KEY_WAREHOUSE = "warehouse";
public static final String KEY_DATABASE_FILTER = "database-filter";
diff --git
a/amoro-format-iceberg/src/main/java/org/apache/amoro/properties/HiveTableProperties.java
b/amoro-format-iceberg/src/main/java/org/apache/amoro/properties/HiveTableProperties.java
index 63808c942..e99003ec9 100644
---
a/amoro-format-iceberg/src/main/java/org/apache/amoro/properties/HiveTableProperties.java
+++
b/amoro-format-iceberg/src/main/java/org/apache/amoro/properties/HiveTableProperties.java
@@ -31,7 +31,6 @@ public class HiveTableProperties {
}
public static final String MIXED_TABLE_FLAG = "arctic.enabled";
- @Deprecated public static final String AMORO_TABLE_FLAG_LEGACY =
"arctic.enable";
public static final String MIXED_TABLE_PRIMARY_KEYS =
"arctic.table.primary-keys";
// save the root location of mixed-format table.
diff --git
a/amoro-format-iceberg/src/main/java/org/apache/amoro/table/TableProperties.java
b/amoro-format-iceberg/src/main/java/org/apache/amoro/table/TableProperties.java
index 1ff9d541f..f98fb75c9 100644
---
a/amoro-format-iceberg/src/main/java/org/apache/amoro/table/TableProperties.java
+++
b/amoro-format-iceberg/src/main/java/org/apache/amoro/table/TableProperties.java
@@ -125,29 +125,6 @@ public class TableProperties {
"self-optimizing.min-plan-interval";
public static final long SELF_OPTIMIZING_MIN_PLAN_INTERVAL_DEFAULT = 60000;
- /** deprecated table optimize related properties */
- @Deprecated public static final String ENABLE_OPTIMIZE = "optimize.enable";
-
- @Deprecated public static final String OPTIMIZE_GROUP = "optimize.group";
-
- @Deprecated public static final String OPTIMIZE_RETRY_NUMBER =
"optimize.num-retries";
-
- @Deprecated public static final String OPTIMIZE_MAX_FILE_COUNT =
"optimize.max-file-count";
-
- @Deprecated
- public static final String FULL_OPTIMIZE_TRIGGER_MAX_INTERVAL =
- "optimize.full.trigger.max-interval";
-
- @Deprecated
- public static final String MINOR_OPTIMIZE_TRIGGER_MAX_INTERVAL =
- "optimize.minor.trigger.max-interval";
-
- @Deprecated
- public static final String MINOR_OPTIMIZE_TRIGGER_DELETE_FILE_COUNT =
- "optimize.minor.trigger.delete-file-count";
-
- @Deprecated public static final String OPTIMIZE_QUOTA = "optimize.quota";
-
/** table clean related properties */
public static final String ENABLE_TABLE_EXPIRE = "table-expire.enabled";
@@ -156,17 +133,6 @@ public class TableProperties {
public static final String CHANGE_DATA_TTL = "change.data.ttl.minutes";
public static final long CHANGE_DATA_TTL_DEFAULT = 10080; // 7 Days
- /**
- * @deprecated Use {@link TableProperties#SNAPSHOT_KEEP_DURATION } instead;
will be removed in
- * 0.9.0
- */
- @Deprecated public static final String BASE_SNAPSHOT_KEEP_MINUTES =
"snapshot.base.keep.minutes";
- /**
- * @deprecated Use {@link TableProperties#SNAPSHOT_KEEP_DURATION_DEFAULT }
instead; will be
- * removed in 0.9.0
- */
- @Deprecated public static final long BASE_SNAPSHOT_KEEP_MINUTES_DEFAULT =
720; // 12 Hours
-
public static final String SNAPSHOT_KEEP_DURATION = "snapshot.keep.duration";
public static final String SNAPSHOT_KEEP_DURATION_DEFAULT = "720min"; // 12
Hours
@@ -221,9 +187,6 @@ public class TableProperties {
+ // v123.metadata.json
"|.*[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}-m[0-9]+\\.avro"; //
UUID-m0.avro
- @Deprecated public static final String ENABLE_TABLE_EXPIRE_LEGACY =
"table-expire.enable";
- @Deprecated public static final String ENABLE_ORPHAN_CLEAN_LEGACY =
"clean-orphan-file.enable";
-
/** table tag management related properties */
public static final String ENABLE_AUTO_CREATE_TAG =
"tag.auto-create.enabled";
@@ -333,8 +296,6 @@ public class TableProperties {
public static final String OWNER = "owner";
- @Deprecated public static final String ENABLE_LOG_STORE_LEGACY =
"log-store.enable";
-
/** table format related properties */
public static final String TABLE_FORMAT = "table-format";
diff --git
a/amoro-format-iceberg/src/main/java/org/apache/amoro/utils/CompatiblePropertyUtil.java
b/amoro-format-iceberg/src/main/java/org/apache/amoro/utils/CompatiblePropertyUtil.java
index 6d68cfe7a..67d714aa7 100644
---
a/amoro-format-iceberg/src/main/java/org/apache/amoro/utils/CompatiblePropertyUtil.java
+++
b/amoro-format-iceberg/src/main/java/org/apache/amoro/utils/CompatiblePropertyUtil.java
@@ -18,7 +18,6 @@
package org.apache.amoro.utils;
-import org.apache.amoro.table.TableProperties;
import org.apache.iceberg.util.PropertyUtil;
import java.util.Map;
@@ -30,76 +29,26 @@ public class CompatiblePropertyUtil {
public static boolean propertyAsBoolean(
Map<String, String> properties, String property, boolean defaultValue) {
- return PropertyUtil.propertyAsBoolean(
- properties, getCompatibleProperty(properties, property), defaultValue);
+ return PropertyUtil.propertyAsBoolean(properties, property, defaultValue);
}
public static double propertyAsDouble(
Map<String, String> properties, String property, double defaultValue) {
- return PropertyUtil.propertyAsDouble(
- properties, getCompatibleProperty(properties, property), defaultValue);
+ return PropertyUtil.propertyAsDouble(properties, property, defaultValue);
}
public static int propertyAsInt(
Map<String, String> properties, String property, int defaultValue) {
- return PropertyUtil.propertyAsInt(
- properties, getCompatibleProperty(properties, property), defaultValue);
+ return PropertyUtil.propertyAsInt(properties, property, defaultValue);
}
public static long propertyAsLong(
Map<String, String> properties, String property, long defaultValue) {
- return PropertyUtil.propertyAsLong(
- properties, getCompatibleProperty(properties, property), defaultValue);
+ return PropertyUtil.propertyAsLong(properties, property, defaultValue);
}
public static String propertyAsString(
Map<String, String> properties, String property, String defaultValue) {
- return PropertyUtil.propertyAsString(
- properties, getCompatibleProperty(properties, property), defaultValue);
- }
-
- private static String getCompatibleProperty(Map<String, String> properties,
String property) {
- String legacyProperty = getLegacyProperty(property);
- if (legacyProperty != null
- && properties.containsKey(legacyProperty)
- && !properties.containsKey(property)) {
- return legacyProperty;
- } else {
- return property;
- }
- }
-
- private static String getLegacyProperty(String property) {
- if (property == null) {
- return null;
- }
- switch (property) {
- case TableProperties.ENABLE_SELF_OPTIMIZING:
- return TableProperties.ENABLE_OPTIMIZE;
- case TableProperties.SELF_OPTIMIZING_GROUP:
- return TableProperties.OPTIMIZE_GROUP;
- case TableProperties.SELF_OPTIMIZING_QUOTA:
- return TableProperties.OPTIMIZE_QUOTA;
- case TableProperties.SELF_OPTIMIZING_EXECUTE_RETRY_NUMBER:
- return TableProperties.OPTIMIZE_RETRY_NUMBER;
- case TableProperties.SELF_OPTIMIZING_MAX_FILE_CNT:
- return TableProperties.OPTIMIZE_MAX_FILE_COUNT;
- case TableProperties.SELF_OPTIMIZING_MINOR_TRIGGER_FILE_CNT:
- return TableProperties.MINOR_OPTIMIZE_TRIGGER_DELETE_FILE_COUNT;
- case TableProperties.SELF_OPTIMIZING_MINOR_TRIGGER_INTERVAL:
- return TableProperties.MINOR_OPTIMIZE_TRIGGER_MAX_INTERVAL;
- case TableProperties.SELF_OPTIMIZING_FULL_TRIGGER_INTERVAL:
- return TableProperties.FULL_OPTIMIZE_TRIGGER_MAX_INTERVAL;
- case TableProperties.ENABLE_TABLE_EXPIRE:
- return TableProperties.ENABLE_TABLE_EXPIRE_LEGACY;
- case TableProperties.ENABLE_ORPHAN_CLEAN:
- return TableProperties.ENABLE_ORPHAN_CLEAN_LEGACY;
- case TableProperties.ENABLE_LOG_STORE:
- return TableProperties.ENABLE_LOG_STORE_LEGACY;
- case TableProperties.SNAPSHOT_KEEP_DURATION:
- return TableProperties.BASE_SNAPSHOT_KEEP_MINUTES;
- default:
- return null;
- }
+ return PropertyUtil.propertyAsString(properties, property, defaultValue);
}
}
diff --git
a/amoro-format-iceberg/src/test/java/org/apache/amoro/catalog/BasicMixedCatalog.java
b/amoro-format-iceberg/src/test/java/org/apache/amoro/catalog/BasicMixedCatalog.java
index 16b7c0afa..198bd1914 100644
---
a/amoro-format-iceberg/src/test/java/org/apache/amoro/catalog/BasicMixedCatalog.java
+++
b/amoro-format-iceberg/src/test/java/org/apache/amoro/catalog/BasicMixedCatalog.java
@@ -474,10 +474,7 @@ public class BasicMixedCatalog implements
MixedFormatCatalog {
if (catalogProperties != null) {
String catalogWarehouse =
catalogProperties.getOrDefault(CatalogMetaProperties.KEY_WAREHOUSE, null);
- if (catalogWarehouse == null) {
- catalogWarehouse =
-
catalogProperties.getOrDefault(CatalogMetaProperties.KEY_WAREHOUSE_DIR, null);
- }
+
if (catalogWarehouse == null) {
throw new NullPointerException("Catalog warehouse is null.");
}
diff --git
a/amoro-format-iceberg/src/test/java/org/apache/amoro/utils/TestCompatiblePropertyUtil.java
b/amoro-format-iceberg/src/test/java/org/apache/amoro/utils/TestCompatiblePropertyUtil.java
index 6099e672c..5bdf6dcd2 100644
---
a/amoro-format-iceberg/src/test/java/org/apache/amoro/utils/TestCompatiblePropertyUtil.java
+++
b/amoro-format-iceberg/src/test/java/org/apache/amoro/utils/TestCompatiblePropertyUtil.java
@@ -43,19 +43,12 @@ public class TestCompatiblePropertyUtil {
properties,
TableProperties.ENABLE_SELF_OPTIMIZING,
TableProperties.ENABLE_SELF_OPTIMIZING_DEFAULT));
-
- properties.put(TableProperties.ENABLE_OPTIMIZE, "true");
- Assert.assertFalse(
- CompatiblePropertyUtil.propertyAsBoolean(
- properties,
- TableProperties.ENABLE_SELF_OPTIMIZING,
- TableProperties.ENABLE_SELF_OPTIMIZING_DEFAULT));
}
@Test
public void testGetLegacyProperty() {
Map<String, String> properties = Maps.newHashMap();
- properties.put(TableProperties.ENABLE_OPTIMIZE, "false");
+ properties.put(TableProperties.ENABLE_SELF_OPTIMIZING, "false");
Assert.assertFalse(
CompatiblePropertyUtil.propertyAsBoolean(
properties,
diff --git
a/amoro-format-mixed/amoro-mixed-hive/src/main/java/org/apache/amoro/hive/utils/CompatibleHivePropertyUtil.java
b/amoro-format-mixed/amoro-mixed-hive/src/main/java/org/apache/amoro/hive/utils/CompatibleHivePropertyUtil.java
index bf9569265..7e3a0c1e9 100644
---
a/amoro-format-mixed/amoro-mixed-hive/src/main/java/org/apache/amoro/hive/utils/CompatibleHivePropertyUtil.java
+++
b/amoro-format-mixed/amoro-mixed-hive/src/main/java/org/apache/amoro/hive/utils/CompatibleHivePropertyUtil.java
@@ -18,7 +18,6 @@
package org.apache.amoro.hive.utils;
-import org.apache.amoro.properties.HiveTableProperties;
import org.apache.iceberg.util.PropertyUtil;
import java.util.Map;
@@ -30,54 +29,26 @@ public class CompatibleHivePropertyUtil {
public static boolean propertyAsBoolean(
Map<String, String> properties, String property, boolean defaultValue) {
- return PropertyUtil.propertyAsBoolean(
- properties, getCompatibleProperty(properties, property), defaultValue);
+ return PropertyUtil.propertyAsBoolean(properties, property, defaultValue);
}
public static double propertyAsDouble(
Map<String, String> properties, String property, double defaultValue) {
- return PropertyUtil.propertyAsDouble(
- properties, getCompatibleProperty(properties, property), defaultValue);
+ return PropertyUtil.propertyAsDouble(properties, property, defaultValue);
}
public static int propertyAsInt(
Map<String, String> properties, String property, int defaultValue) {
- return PropertyUtil.propertyAsInt(
- properties, getCompatibleProperty(properties, property), defaultValue);
+ return PropertyUtil.propertyAsInt(properties, property, defaultValue);
}
public static long propertyAsLong(
Map<String, String> properties, String property, long defaultValue) {
- return PropertyUtil.propertyAsLong(
- properties, getCompatibleProperty(properties, property), defaultValue);
+ return PropertyUtil.propertyAsLong(properties, property, defaultValue);
}
public static String propertyAsString(
Map<String, String> properties, String property, String defaultValue) {
- return PropertyUtil.propertyAsString(
- properties, getCompatibleProperty(properties, property), defaultValue);
- }
-
- private static String getCompatibleProperty(Map<String, String> properties,
String property) {
- String legacyProperty = getLegacyProperty(property);
- if (legacyProperty != null
- && properties.containsKey(legacyProperty)
- && !properties.containsKey(property)) {
- return legacyProperty;
- } else {
- return property;
- }
- }
-
- private static String getLegacyProperty(String property) {
- if (property == null) {
- return null;
- }
- switch (property) {
- case HiveTableProperties.MIXED_TABLE_FLAG:
- return HiveTableProperties.AMORO_TABLE_FLAG_LEGACY;
- default:
- return null;
- }
+ return PropertyUtil.propertyAsString(properties, property, defaultValue);
}
}
diff --git
a/amoro-format-mixed/amoro-mixed-hive/src/test/java/org/apache/amoro/hive/utils/TestCompatibleHivePropertyUtil.java
b/amoro-format-mixed/amoro-mixed-hive/src/test/java/org/apache/amoro/hive/utils/TestCompatibleHivePropertyUtil.java
index 8ea129273..fcf4602c5 100644
---
a/amoro-format-mixed/amoro-mixed-hive/src/test/java/org/apache/amoro/hive/utils/TestCompatibleHivePropertyUtil.java
+++
b/amoro-format-mixed/amoro-mixed-hive/src/test/java/org/apache/amoro/hive/utils/TestCompatibleHivePropertyUtil.java
@@ -38,19 +38,5 @@ public class TestCompatibleHivePropertyUtil {
Assert.assertTrue(
CompatibleHivePropertyUtil.propertyAsBoolean(
properties, HiveTableProperties.MIXED_TABLE_FLAG, false));
-
- properties.put(HiveTableProperties.AMORO_TABLE_FLAG_LEGACY, "false");
- Assert.assertTrue(
- CompatibleHivePropertyUtil.propertyAsBoolean(
- properties, HiveTableProperties.MIXED_TABLE_FLAG, false));
- }
-
- @Test
- public void testGetLegacyProperty() {
- Map<String, String> properties = Maps.newHashMap();
- properties.put(HiveTableProperties.AMORO_TABLE_FLAG_LEGACY, "true");
- Assert.assertTrue(
- CompatibleHivePropertyUtil.propertyAsBoolean(
- properties, HiveTableProperties.MIXED_TABLE_FLAG, false));
}
}
diff --git
a/amoro-format-mixed/amoro-mixed-spark/v3.3/amoro-mixed-spark-3.3/src/test/java/org/apache/amoro/spark/test/suites/sql/TestMixedFormatSessionCatalog.java
b/amoro-format-mixed/amoro-mixed-spark/v3.3/amoro-mixed-spark-3.3/src/test/java/org/apache/amoro/spark/test/suites/sql/TestMixedFormatSessionCatalog.java
index f1b414e24..f4945d5b6 100644
---
a/amoro-format-mixed/amoro-mixed-spark/v3.3/amoro-mixed-spark-3.3/src/test/java/org/apache/amoro/spark/test/suites/sql/TestMixedFormatSessionCatalog.java
+++
b/amoro-format-mixed/amoro-mixed-spark/v3.3/amoro-mixed-spark-3.3/src/test/java/org/apache/amoro/spark/test/suites/sql/TestMixedFormatSessionCatalog.java
@@ -154,15 +154,14 @@ public class TestMixedFormatSessionCatalog extends
MixedTableTestBase {
}
@Test
- public void testLoadLegacyTable() {
+ public void testLoadTable() {
createTarget(
SCHEMA,
c ->
c.withPrimaryKeySpec(PrimaryKeySpec.builderFor(SCHEMA).addColumn("id").build()));
createViewSource(SCHEMA, source);
Table hiveTable = loadHiveTable();
Map<String, String> properties =
Maps.newHashMap(hiveTable.getParameters());
- properties.remove(HiveTableProperties.MIXED_TABLE_FLAG);
- properties.put(HiveTableProperties.AMORO_TABLE_FLAG_LEGACY, "true");
+ properties.put(HiveTableProperties.MIXED_TABLE_FLAG, "true");
hiveTable.setParameters(properties);
try {
CONTEXT
diff --git
a/amoro-format-mixed/amoro-mixed-spark/v3.5/amoro-mixed-spark-3.5/src/test/java/org/apache/amoro/spark/test/suites/sql/TestMixedFormatSessionCatalog.java
b/amoro-format-mixed/amoro-mixed-spark/v3.5/amoro-mixed-spark-3.5/src/test/java/org/apache/amoro/spark/test/suites/sql/TestMixedFormatSessionCatalog.java
index dec6d8a7d..b12e78c1e 100644
---
a/amoro-format-mixed/amoro-mixed-spark/v3.5/amoro-mixed-spark-3.5/src/test/java/org/apache/amoro/spark/test/suites/sql/TestMixedFormatSessionCatalog.java
+++
b/amoro-format-mixed/amoro-mixed-spark/v3.5/amoro-mixed-spark-3.5/src/test/java/org/apache/amoro/spark/test/suites/sql/TestMixedFormatSessionCatalog.java
@@ -138,15 +138,14 @@ public class TestMixedFormatSessionCatalog extends
MixedTableTestBase {
}
@Test
- public void testLoadLegacyTable() {
+ public void testLoadTable() {
createTarget(
SCHEMA,
c ->
c.withPrimaryKeySpec(PrimaryKeySpec.builderFor(SCHEMA).addColumn("id").build()));
createViewSource(SCHEMA, source);
Table hiveTable = loadHiveTable();
Map<String, String> properties =
Maps.newHashMap(hiveTable.getParameters());
- properties.remove(HiveTableProperties.MIXED_TABLE_FLAG);
- properties.put(HiveTableProperties.AMORO_TABLE_FLAG_LEGACY, "true");
+ properties.put(HiveTableProperties.MIXED_TABLE_FLAG, "true");
hiveTable.setParameters(properties);
try {
CONTEXT