rambleraptor commented on code in PR #1461:
URL: https://github.com/apache/iceberg-go/pull/1461#discussion_r3582686351
##########
catalog/rest/rest_integration_test.go:
##########
@@ -289,6 +289,49 @@ func (s *RestIntegrationSuite) TestUpdateView() {
s.Require().NoError(s.cat.DropView(s.ctx,
catalog.ToIdentifier(TestNamespaceIdent, "test-view")))
}
+func (s *RestIntegrationSuite) TestRenameView() {
+ s.ensureNamespace()
+
+ const location = "s3://warehouse/iceberg"
+ tbl, err := s.cat.CreateTable(s.ctx,
+ catalog.ToIdentifier(TestNamespaceIdent, "test-table"),
+ tableSchemaSimple,
catalog.WithProperties(iceberg.Properties{"foobar": "baz"}),
+ catalog.WithLocation(location))
+ s.Require().NoError(err)
+ s.Require().NotNil(tbl)
+
+ // Create a view to rename
+ fromIdent := catalog.ToIdentifier(TestNamespaceIdent, "test-view")
+ toIdent := catalog.ToIdentifier(TestNamespaceIdent, "renamed-view")
+
+ viewRepr := view.NewRepresentation(fmt.Sprintf("SELECT * FROM %s.%s",
TestNamespaceIdent, "test-table"), "trino")
Review Comment:
Yeah, we should do this the right way. Fixed.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]