You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "legendtkl (via GitHub)" <gi...@apache.org> on 2023/08/04 11:03:06 UTC
[GitHub] [incubator-paimon] legendtkl opened a new pull request, #1734: [flink] add option to support disable creating table in default database
legendtkl opened a new pull request, #1734:
URL: https://github.com/apache/incubator-paimon/pull/1734
<!-- Please specify the module before the PR name: [core] ... or [flink] ... -->
### Purpose
<!-- Linking this pull request to the issue -->
Linked issue: close https://github.com/apache/incubator-paimon/issues/1729
<!-- What is the purpose of the change -->
### Tests
FlinkCatalogTest
### API and Format
<!-- Does this change affect API or storage format -->
### Documentation
<!-- Does this change introduce a new feature -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-paimon] legendtkl commented on pull request #1734: [flink] add option to support disable creating table in default database
Posted by "legendtkl (via GitHub)" <gi...@apache.org>.
legendtkl commented on PR #1734:
URL: https://github.com/apache/incubator-paimon/pull/1734#issuecomment-1678347643
Hi, @FangYongs and @zhuangchong , let's have a discussion about the implementation.
1. Now flink engine support to specify the default database name with option `default-database` for flink, this will be stored in `org.apache.flink.table.catalog.AbstractCatalog`
2. But for paimon catalog, we can't access the default database specified by flink. If we check it in Paimon catalog, the info is missed.
3. So I propose to support this issue in FlinkCatalog now only. For Paimon default database support we can open a new ticket for it.
What do you think?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-paimon] FangYongs commented on pull request #1734: [flink] add option to support disable creating table in default database
Posted by "FangYongs (via GitHub)" <gi...@apache.org>.
FangYongs commented on PR #1734:
URL: https://github.com/apache/incubator-paimon/pull/1734#issuecomment-1676745179
Thanks @legendtkl , left some comments
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-paimon] FangYongs commented on pull request #1734: [flink] add option to support disable creating table in default database
Posted by "FangYongs (via GitHub)" <gi...@apache.org>.
FangYongs commented on PR #1734:
URL: https://github.com/apache/incubator-paimon/pull/1734#issuecomment-1695504789
@legendtkl There're some conflicts
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-paimon] legendtkl closed pull request #1734: [flink] add option to support disable creating table in default database
Posted by "legendtkl (via GitHub)" <gi...@apache.org>.
legendtkl closed pull request #1734: [flink] add option to support disable creating table in default database
URL: https://github.com/apache/incubator-paimon/pull/1734
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-paimon] FangYongs commented on pull request #1734: [flink] add option to support disable creating table in default database
Posted by "FangYongs (via GitHub)" <gi...@apache.org>.
FangYongs commented on PR #1734:
URL: https://github.com/apache/incubator-paimon/pull/1734#issuecomment-1713092178
Thanks @legendtkl , +1
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-paimon] zhuangchong commented on pull request #1734: [flink] add option to support disable creating table in default database
Posted by "zhuangchong (via GitHub)" <gi...@apache.org>.
zhuangchong commented on PR #1734:
URL: https://github.com/apache/incubator-paimon/pull/1734#issuecomment-1667057118
I understand that it is supported in the paimon catalog, not just in the Flink engine. cc @FangYongs
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-paimon] FangYongs commented on a diff in pull request #1734: [flink] add option to support disable creating table in default database
Posted by "FangYongs (via GitHub)" <gi...@apache.org>.
FangYongs commented on code in PR #1734:
URL: https://github.com/apache/incubator-paimon/pull/1734#discussion_r1293015758
##########
paimon-core/src/main/java/org/apache/paimon/catalog/AbstractCatalog.java:
##########
@@ -205,4 +209,11 @@ public static Path databasePath(String warehouse, String database) {
protected boolean isSystemDatabase(String database) {
return SYSTEM_DATABASE_NAME.equals(database);
}
+
+ protected boolean allowCreateTableInDefaultDB(Identifier identifier) {
+ return this.options
+ .getOptional(DISABLE_CREATE_TABLE_IN_DEFAULT_DB)
+ .map(val -> !(val & DEFAULT_DATABASE.equals(identifier.getDatabaseName())))
Review Comment:
In addition, users can configure default database name with option `default-database` for flink
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-paimon] legendtkl commented on pull request #1734: [flink] add option to support disable creating table in default database
Posted by "legendtkl (via GitHub)" <gi...@apache.org>.
legendtkl commented on PR #1734:
URL: https://github.com/apache/incubator-paimon/pull/1734#issuecomment-1667137079
> @zhuangchong Agree, and @legendtkl could you move this to paimon catalog instead of flink catalog?
Got it. @FangYongs @zhuangchong
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-paimon] legendtkl closed pull request #1734: [flink] add option to support disable creating table in default database
Posted by "legendtkl (via GitHub)" <gi...@apache.org>.
legendtkl closed pull request #1734: [flink] add option to support disable creating table in default database
URL: https://github.com/apache/incubator-paimon/pull/1734
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-paimon] FangYongs commented on pull request #1734: [flink] add option to support disable creating table in default database
Posted by "FangYongs (via GitHub)" <gi...@apache.org>.
FangYongs commented on PR #1734:
URL: https://github.com/apache/incubator-paimon/pull/1734#issuecomment-1679874233
Thanks @legendtkl , it sounds good to me to support flink catalog in this PR
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-paimon] FangYongs commented on pull request #1734: [flink] add option to support disable creating table in default database
Posted by "FangYongs (via GitHub)" <gi...@apache.org>.
FangYongs commented on PR #1734:
URL: https://github.com/apache/incubator-paimon/pull/1734#issuecomment-1667091117
@zhuangchong Agree, and @legendtkl could you move this to paimon catalog instead of flink catalog?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-paimon] legendtkl commented on pull request #1734: [flink] add option to support disable creating table in default database
Posted by "legendtkl (via GitHub)" <gi...@apache.org>.
legendtkl commented on PR #1734:
URL: https://github.com/apache/incubator-paimon/pull/1734#issuecomment-1676664723
Hi, @FangYongs , @zhuangchong , I have addressed the review comment, would you help review it?
Thanks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-paimon] FangYongs commented on a diff in pull request #1734: [flink] add option to support disable creating table in default database
Posted by "FangYongs (via GitHub)" <gi...@apache.org>.
FangYongs commented on code in PR #1734:
URL: https://github.com/apache/incubator-paimon/pull/1734#discussion_r1293010120
##########
paimon-core/src/main/java/org/apache/paimon/catalog/AbstractCatalog.java:
##########
@@ -205,4 +209,11 @@ public static Path databasePath(String warehouse, String database) {
protected boolean isSystemDatabase(String database) {
return SYSTEM_DATABASE_NAME.equals(database);
}
+
+ protected boolean allowCreateTableInDefaultDB(Identifier identifier) {
+ return this.options
+ .getOptional(DISABLE_CREATE_TABLE_IN_DEFAULT_DB)
+ .map(val -> !(val & DEFAULT_DATABASE.equals(identifier.getDatabaseName())))
Review Comment:
Use `&&`?
##########
paimon-core/src/main/java/org/apache/paimon/catalog/AbstractCatalog.java:
##########
@@ -205,4 +209,11 @@ public static Path databasePath(String warehouse, String database) {
protected boolean isSystemDatabase(String database) {
return SYSTEM_DATABASE_NAME.equals(database);
}
+
+ protected boolean allowCreateTableInDefaultDB(Identifier identifier) {
+ return this.options
+ .getOptional(DISABLE_CREATE_TABLE_IN_DEFAULT_DB)
+ .map(val -> !(val & DEFAULT_DATABASE.equals(identifier.getDatabaseName())))
Review Comment:
Use `&&`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-paimon] FangYongs merged pull request #1734: [flink] add option to support disable creating table in default database
Posted by "FangYongs (via GitHub)" <gi...@apache.org>.
FangYongs merged PR #1734:
URL: https://github.com/apache/incubator-paimon/pull/1734
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-paimon] legendtkl commented on pull request #1734: [flink] add option to support disable creating table in default database
Posted by "legendtkl (via GitHub)" <gi...@apache.org>.
legendtkl commented on PR #1734:
URL: https://github.com/apache/incubator-paimon/pull/1734#issuecomment-1710478807
@FangYongs resolved, PTAL.
Thanks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org