Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Aitozi committed Mar 28, 2024
1 parent f7cfb56 commit 10b2536
Showing 1 changed file with 6 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
import static org.apache.paimon.CoreOptions.CHANGELOG_NUM_RETAINED_MAX;
import static org.apache.paimon.CoreOptions.CHANGELOG_NUM_RETAINED_MIN;
import static org.apache.paimon.CoreOptions.CHANGELOG_PRODUCER;
import static org.apache.paimon.CoreOptions.CHANGELOG_TIME_RETAINED;
import static org.apache.paimon.CoreOptions.FIELDS_PREFIX;
import static org.apache.paimon.CoreOptions.FULL_COMPACTION_DELTA_COMMITS;
import static org.apache.paimon.CoreOptions.INCREMENTAL_BETWEEN;
Expand All @@ -61,7 +60,6 @@
import static org.apache.paimon.CoreOptions.SCAN_TIMESTAMP_MILLIS;
import static org.apache.paimon.CoreOptions.SNAPSHOT_NUM_RETAINED_MAX;
import static org.apache.paimon.CoreOptions.SNAPSHOT_NUM_RETAINED_MIN;
import static org.apache.paimon.CoreOptions.SNAPSHOT_TIME_RETAINED;
import static org.apache.paimon.CoreOptions.STREAMING_READ_OVERWRITE;
import static org.apache.paimon.mergetree.compact.PartialUpdateMergeFunction.SEQUENCE_GROUP;
import static org.apache.paimon.schema.SystemColumns.KEY_FIELD_PREFIX;
Expand Down Expand Up @@ -124,21 +122,15 @@ public static void validateTableSchema(TableSchema schema) {
SNAPSHOT_NUM_RETAINED_MIN.key()
+ " should not be larger than "
+ SNAPSHOT_NUM_RETAINED_MAX.key());

checkArgument(
options.changelogTimeRetain().toMillis() >= options.snapshotTimeRetain().toMillis(),
CHANGELOG_TIME_RETAINED.key()
+ " should not less than "
+ SNAPSHOT_TIME_RETAINED.key());
options.changelogNumRetainMin() > 0,
CHANGELOG_NUM_RETAINED_MIN.key() + " should be at least 1");
checkArgument(
options.changelogNumRetainMin() >= options.snapshotNumRetainMin(),
options.changelogNumRetainMin() <= options.changelogNumRetainMax(),
CHANGELOG_NUM_RETAINED_MIN.key()
+ " should not less than "
+ SNAPSHOT_NUM_RETAINED_MIN.key());
checkArgument(
options.changelogNumRetainMax() >= options.changelogNumRetainMax(),
CHANGELOG_NUM_RETAINED_MAX.key()
+ " should not less than "
+ SNAPSHOT_NUM_RETAINED_MAX.key());
+ " should not be larger than "
+ CHANGELOG_NUM_RETAINED_MAX.key());

// Get the format type here which will try to convert string value to {@Code
// FileFormatType}. If the string value is illegal, an exception will be thrown.
Expand Down

0 comments on commit 10b2536

Please sign in to comment.