-
Notifications
You must be signed in to change notification settings - Fork 998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[core]Add schema validation for record-level.time-field #4758
base: master
Are you sure you want to change the base?
Conversation
@@ -176,6 +181,35 @@ public static void validateTableSchema(TableSchema schema) { | |||
} | |||
} | |||
|
|||
if (schema.options().containsKey(CoreOptions.RECORD_LEVEL_TIME_FIELD.key())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
String recordLevelTimeField = options.recordLevelTimeField();
if (recordLevelTimeField != null) {
xxx;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
|
||
@Test | ||
public void testRecordLevelTimeField() { | ||
Map<String, String> options = new HashMap<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Map<String, String> options = new HashMap<>(2);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
class RecordLevelExpireTest extends PrimaryKeyTableTestBase { | ||
@Override |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a blank line before @OverRide.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
class RecordLevelExpireTest extends PrimaryKeyTableTestBase { | ||
@Override | ||
@BeforeEach | ||
public void beforeEachBase() throws Exception { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why add this method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Column "col1" datatype is DataTypes.INT()
in PrimaryKeyTableTestBase, but it should be DataTypes.INT().notNull()
in RecordLevelExpireTest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
+1 |
Purpose
Add schema validation for record-level.time-field
Linked issue: close #4724
Tests
API and Format
Documentation