difin commented on code in PR #6449:
URL: https://github.com/apache/hive/pull/6449#discussion_r3327175743
##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/view/create/CreateViewOperation.java:
##########
@@ -105,6 +114,25 @@ public int execute() throws HiveException {
return 0;
}
+ private void pushExternalLogicalViewSessionHints(boolean replace, boolean
ifNotExists) {
+ SessionStateUtil.addResource(context.getConf(),
Constants.EXTERNAL_LOGICAL_VIEW_DDL_REPLACE,
+ Boolean.toString(replace));
+ SessionStateUtil.addResource(context.getConf(),
Constants.EXTERNAL_LOGICAL_VIEW_CREATE_IF_NOT_EXISTS,
+ Boolean.toString(ifNotExists));
+ }
Review Comment:
Thanks, Krisztian, you are right, `replace` and `ifNotExists` do not need to
be in the session or env context.
Fixed.
I added tests for `replace` and `if-not-exists` in case of
`HiveRESTCatalogClient` to `iceberg_rest_catalog_gravitino.q`:
```
create view if not exists ice_v1 tblproperties ('view-format'='iceberg')
as select first_name, last_name from ice_orc2 where dept_id in (1, 3);
select * from ice_v1;
desc formatted ice_v1;
create or replace view ice_v1 tblproperties ('view-format'='iceberg')
as select first_name || '-' || dept_id from ice_orc2 where dept_id = 2;
select * from ice_v1;
desc formatted ice_v1;
```
--
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]