-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Feature] Support configure tableIdentifier for schema #5628
Conversation
ba64f72
to
3c56bc2
Compare
3c56bc2
to
5fb8b01
Compare
docs/en/concept/schema-feature.md
Outdated
@@ -24,6 +26,14 @@ schema = { | |||
} | |||
``` | |||
|
|||
### table | |||
|
|||
The table full name of the table identifier which the schema belongs to, it contains database, schema, table name. e.g. `database.schema.table`, `database.table`. |
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.
The table full name of the table identifier which the schema belongs to, it contains database, schema, table name. e.g. `database.schema.table`, `database.table`. | |
The table full name of the table identifier which the schema belongs to, it contains database, schema, table name. e.g. `database.schema.table`, `database.table`, `schema.table`. |
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.
We cannot support schema.table
yet.
Since if user write a.b
, we cannot know whather the given a
is schema or database. And the logic is same with current code in TablePath::of(String fullName), the database and table is mandatory but schema is chooseable.
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.
You can consider integrating this scenario in the future
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.
I update this PR, we can support config schema.table
and table
in config.
5fb8b01
to
bff7686
Compare
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.
Could you update the doc to describe the behavior of both config table
and table-names
?
docs/en/concept/schema-feature.md
Outdated
|
||
Default is false. | ||
|
||
If the schemaFirst is true, the schema will be used first, this means if we set `table = "a.b"`, a will be parsed as schema rather than database, then we can support write `table = "schema.table"`. |
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.
If the schemaFirst is true, the schema will be used first, this means if we set `table = "a.b"`, a will be parsed as schema rather than database, then we can support write `table = "schema.table"`. | |
If the schema_first is true, the schema will be used first, this means if we set `table = "a.b"`, `a` will be parsed as schema rather than database, then we can support write `table = "schema.table"`. |
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.
done.
docs/en/concept/schema-feature.md
Outdated
|
||
The table full name of the table identifier which the schema belongs to, it contains database, schema, table name. e.g. `database.schema.table`, `database.table`, `table`. | ||
|
||
### schemaFirst |
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.
For same config style.
### schemaFirst | |
### schema_first |
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.
done
@@ -28,6 +28,27 @@ | |||
|
|||
public class TableSchemaOptions { | |||
|
|||
public static class TableIdentifierOptions { | |||
|
|||
public static final Option<Boolean> SCHEMA_FIRST = |
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.
ditto
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.
done
good job. |
bff7686
to
bbaf7bc
Compare
bbaf7bc
to
15c62a3
Compare
1445ba0
to
156cc33
Compare
(cherry picked from commit 652921f)
Purpose of this pull request
Right now, the CatalogTable generated by config.schema will miss TableIdentifier.
The catalogName can be parsed by connectorName, but the tableIdentifier cannot be configured, this pr will add table/database/comment option in schema, this will used to generate CatalogTable.
Does this PR introduce any user-facing change?
Yes, but this options is not must.
How was this patch tested?
Test by e2e case.
Check list
New License Guide
release-note
.