-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[core]Add schema validation for record-level.time-field #4758
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,18 +19,51 @@ | |
| package org.apache.paimon.table; | ||
|
|
||
| import org.apache.paimon.CoreOptions; | ||
| import org.apache.paimon.catalog.Catalog; | ||
| import org.apache.paimon.catalog.CatalogContext; | ||
| import org.apache.paimon.catalog.CatalogFactory; | ||
| import org.apache.paimon.catalog.Identifier; | ||
| import org.apache.paimon.catalog.PrimaryKeyTableTestBase; | ||
| import org.apache.paimon.data.GenericRow; | ||
| import org.apache.paimon.fs.Path; | ||
| import org.apache.paimon.options.Options; | ||
| import org.apache.paimon.schema.Schema; | ||
| import org.apache.paimon.types.DataTypes; | ||
| import org.apache.paimon.utils.TraceableFileIO; | ||
|
|
||
| import org.junit.jupiter.api.BeforeEach; | ||
| import org.junit.jupiter.api.Test; | ||
|
|
||
| import java.time.Duration; | ||
| import java.util.UUID; | ||
|
|
||
| import static org.assertj.core.api.Assertions.assertThat; | ||
|
|
||
| class RecordLevelExpireTest extends PrimaryKeyTableTestBase { | ||
|
|
||
| @Override | ||
| @BeforeEach | ||
| public void beforeEachBase() throws Exception { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why add this method?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Column "col1" datatype is
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok |
||
| CatalogContext context = | ||
| CatalogContext.create( | ||
| new Path(TraceableFileIO.SCHEME + "://" + tempPath.toString())); | ||
| Catalog catalog = CatalogFactory.createCatalog(context); | ||
| Identifier identifier = new Identifier("default", "T"); | ||
| catalog.createDatabase(identifier.getDatabaseName(), true); | ||
| Schema schema = | ||
| Schema.newBuilder() | ||
| .column("pt", DataTypes.INT()) | ||
| .column("pk", DataTypes.INT()) | ||
| .column("col1", DataTypes.INT().notNull()) | ||
| .partitionKeys("pt") | ||
| .primaryKey("pk", "pt") | ||
| .options(tableOptions().toMap()) | ||
| .build(); | ||
| catalog.createTable(identifier, schema, true); | ||
| table = (FileStoreTable) catalog.getTable(identifier); | ||
| commitUser = UUID.randomUUID().toString(); | ||
| } | ||
|
|
||
| @Override | ||
| protected Options tableOptions() { | ||
| Options options = new Options(); | ||
|
|
||
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