Skip to content
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

[Enhancement] adapt to rest catalog list views interface when user side has not implemented it. (backport #50925) #51144

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Sep 19, 2024

Why I'm doing:

user's rest catalog server side may not implement list_views interface with tabular opensource image tabular-io/iceberg-rest-image@2e4d041. so we need to adapt it.

What I'm doing:

Fixes #issue

2024-09-09 11:55:47.255Z WARN (starrocks-mysql-nio-pool-6|374) [StmtExecutor.execute():750] execute Exception, sql show tables
 org.apache.iceberg.exceptions.BadRequestException: Malformed request: No route for request: GET v1/namespaces/mali/views
	at org.apache.iceberg.rest.ErrorHandlers$DefaultErrorHandler.accept(ErrorHandlers.java:208)
	at org.apache.iceberg.rest.ErrorHandlers$NamespaceErrorHandler.accept(ErrorHandlers.java:180)
	at org.apache.iceberg.rest.ErrorHandlers$NamespaceErrorHandler.accept(ErrorHandlers.java:166)
	at org.apache.iceberg.rest.HTTPClient.throwFailure(HTTPClient.java:211)
	at org.apache.iceberg.rest.HTTPClient.execute(HTTPClient.java:323)
	at org.apache.iceberg.rest.HTTPClient.execute(HTTPClient.java:262)
	at org.apache.iceberg.rest.HTTPClient.get(HTTPClient.java:358)
	at org.apache.iceberg.rest.RESTClient.get(RESTClient.java:96)
	at org.apache.iceberg.rest.RESTSessionCatalog.listViews(RESTSessionCatalog.java:1133)
	at org.apache.iceberg.catalog.BaseViewSessionCatalog$AsViewCatalog.listViews(BaseViewSessionCatalog.java:53)
	at org.apache.iceberg.rest.RESTCatalog.listViews(RESTCatalog.java:273)
	at com.starrocks.connector.iceberg.rest.IcebergRESTCatalog.listTables(IcebergRESTCatalog.java:190)
	at com.starrocks.connector.iceberg.CachingIcebergCatalog.listTables(CachingIcebergCatalog.java:135)
	at com.starrocks.connector.iceberg.IcebergMetadata.listTableNames(IcebergMetadata.java:248)
	at com.starrocks.connector.CatalogConnectorMetadata.listTableNames(CatalogConnectorMetadata.java:124)
	at com.starrocks.server.MetadataMgr.listTableNames(MetadataMgr.java:264)
	at com.starrocks.qe.ShowExecutor$ShowExecutorVisitor.visitShowTableStatement(ShowExecutor.java:480)
	at com.starrocks.qe.ShowExecutor$ShowExecutorVisitor.visitShowTableStatement(ShowExecutor.java:285)
	at com.starrocks.sql.ast.ShowTableStmt.accept(ShowTableStmt.java:131)
	at com.starrocks.sql.ast.AstVisitor.visit(AstVisitor.java:71)
	at com.starrocks.qe.ShowExecutor.execute(ShowExecutor.java:282)
	at com.starrocks.qe.StmtExecutor.handleShow(StmtExecutor.java:1698)
	at com.starrocks.qe.StmtExecutor.execute(StmtExecutor.java:690)
	at com.starrocks.qe.ConnectProcessor.handleQuery(ConnectProcessor.java:360)
	at com.starrocks.qe.ConnectProcessor.dispatch(ConnectProcessor.java:559)
	at com.starrocks.qe.ConnectProcessor.processOnce(ConnectProcessor.java:894)
	at com.starrocks.mysql.nio.ReadListener.lambda$handleEvent$0(ReadListener.java:69)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
  • This is a backport pr

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • 3.3
    • 3.2
    • 3.1
    • 3.0
    • 2.5

This is an automatic backport of pull request #50925 done by [Mergify](https://mergify.com).

Why I'm doing:

user's rest catalog server side may not implement list_views interface with tabular opensource image tabular-io/iceberg-rest-image@2e4d041. so we need to adapt it.

What I'm doing:

Fixes #issue

2024-09-09 11:55:47.255Z WARN (starrocks-mysql-nio-pool-6|374) [StmtExecutor.execute():750] execute Exception, sql show tables
 org.apache.iceberg.exceptions.BadRequestException: Malformed request: No route for request: GET v1/namespaces/mali/views
	at org.apache.iceberg.rest.ErrorHandlers$DefaultErrorHandler.accept(ErrorHandlers.java:208)
	at org.apache.iceberg.rest.ErrorHandlers$NamespaceErrorHandler.accept(ErrorHandlers.java:180)
	at org.apache.iceberg.rest.ErrorHandlers$NamespaceErrorHandler.accept(ErrorHandlers.java:166)
	at org.apache.iceberg.rest.HTTPClient.throwFailure(HTTPClient.java:211)
	at org.apache.iceberg.rest.HTTPClient.execute(HTTPClient.java:323)
	at org.apache.iceberg.rest.HTTPClient.execute(HTTPClient.java:262)
	at org.apache.iceberg.rest.HTTPClient.get(HTTPClient.java:358)
	at org.apache.iceberg.rest.RESTClient.get(RESTClient.java:96)
	at org.apache.iceberg.rest.RESTSessionCatalog.listViews(RESTSessionCatalog.java:1133)
	at org.apache.iceberg.catalog.BaseViewSessionCatalog$AsViewCatalog.listViews(BaseViewSessionCatalog.java:53)
	at org.apache.iceberg.rest.RESTCatalog.listViews(RESTCatalog.java:273)
	at com.starrocks.connector.iceberg.rest.IcebergRESTCatalog.listTables(IcebergRESTCatalog.java:190)
	at com.starrocks.connector.iceberg.CachingIcebergCatalog.listTables(CachingIcebergCatalog.java:135)
	at com.starrocks.connector.iceberg.IcebergMetadata.listTableNames(IcebergMetadata.java:248)
	at com.starrocks.connector.CatalogConnectorMetadata.listTableNames(CatalogConnectorMetadata.java:124)
	at com.starrocks.server.MetadataMgr.listTableNames(MetadataMgr.java:264)
	at com.starrocks.qe.ShowExecutor$ShowExecutorVisitor.visitShowTableStatement(ShowExecutor.java:480)
	at com.starrocks.qe.ShowExecutor$ShowExecutorVisitor.visitShowTableStatement(ShowExecutor.java:285)
	at com.starrocks.sql.ast.ShowTableStmt.accept(ShowTableStmt.java:131)
	at com.starrocks.sql.ast.AstVisitor.visit(AstVisitor.java:71)
	at com.starrocks.qe.ShowExecutor.execute(ShowExecutor.java:282)
	at com.starrocks.qe.StmtExecutor.handleShow(StmtExecutor.java:1698)
	at com.starrocks.qe.StmtExecutor.execute(StmtExecutor.java:690)
	at com.starrocks.qe.ConnectProcessor.handleQuery(ConnectProcessor.java:360)
	at com.starrocks.qe.ConnectProcessor.dispatch(ConnectProcessor.java:559)
	at com.starrocks.qe.ConnectProcessor.processOnce(ConnectProcessor.java:894)
	at com.starrocks.mysql.nio.ReadListener.lambda$handleEvent$0(ReadListener.java:69)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
  • This is a backport pr

…de has not implemented it. (#50925)

Signed-off-by: stephen <[email protected]>
(cherry picked from commit 092c720)
Copy link

sonarcloud bot commented Sep 19, 2024

@wanpengfei-git wanpengfei-git merged commit 109a29c into branch-3.3 Sep 20, 2024
36 of 38 checks passed
@wanpengfei-git wanpengfei-git deleted the mergify/bp/branch-3.3/pr-50925 branch September 20, 2024 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants