[
https://issues.apache.org/jira/browse/PHOENIX-7070?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17779271#comment-17779271
]
ASF GitHub Bot commented on PHOENIX-7070:
-----------------------------------------
virajjasani commented on code in PR #1723:
URL: https://github.com/apache/phoenix/pull/1723#discussion_r1370938795
##########
phoenix-core/src/it/java/org/apache/phoenix/end2end/ReadOnlyTenantViewOnReadOnlyIT.java:
##########
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.phoenix.end2end;
+import static
org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.UPDATE_CACHE_FREQUENCY;
+import static org.junit.Assert.assertEquals;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.util.Properties;
+
+import org.apache.phoenix.jdbc.PhoenixConnection;
+import org.apache.phoenix.schema.PTable;
+import org.apache.phoenix.util.PhoenixRuntime;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+@Category(NeedsOwnMiniClusterTest.class)
+public class ReadOnlyTenantViewOnReadOnlyIT extends
BaseTenantSpecificViewIndexIT {
+ private static final long DEFAULT_TTL_FOR_TEST = 86400;
+ @Test
+ public void testReadOnlyTenantViewOnReadOnly() throws Exception {
Review Comment:
could you also add another test for global child view of "read only" global
parent view?
> Tenant View on ReadOnly View are marked as updatable View
> ---------------------------------------------------------
>
> Key: PHOENIX-7070
> URL: https://issues.apache.org/jira/browse/PHOENIX-7070
> Project: Phoenix
> Issue Type: Bug
> Reporter: Lokesh Khurana
> Assignee: Divneet Kaur
> Priority: Major
>
> When we are creating tenant View without select clause on Readonly views we
> are pushing viewType as Updatable for that tenant views, which should be
> readonly.
> We are putting default view type as
> [Updatable|https://github.com/apache/phoenix/blob/c6539dca43fc81d528dfb0791e67006c7b1fa37a/phoenix-core/src/main/java/org/apache/phoenix/compile/CreateTableCompiler.java#L138C39-L138C50]
> but only updating child view's viewtype when we have a where clause causing
> this problem
> This may be a problem for normal child view without where clause on Readonly
> views as well.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)