[ 
https://issues.apache.org/jira/browse/PHOENIX-6711?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17534815#comment-17534815
 ] 

ASF GitHub Bot commented on PHOENIX-6711:
-----------------------------------------

chrajeshbabu commented on code in PR #1437:
URL: https://github.com/apache/phoenix/pull/1437#discussion_r870157222


##########
phoenix-core/src/it/java/org/apache/phoenix/iterate/MinimalQueryPlanInvolvedTableResultIteratorIT.java:
##########
@@ -0,0 +1,105 @@
+/*
+ * 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.iterate;
+
+import org.apache.hadoop.hbase.client.Scan;
+import org.apache.phoenix.cache.ServerCacheClient;
+import org.apache.phoenix.compile.QueryPlan;
+import org.apache.phoenix.end2end.ParallelStatsDisabledIT;
+import org.apache.phoenix.end2end.ParallelStatsDisabledTest;
+import org.apache.phoenix.execute.MutationState;
+import org.apache.phoenix.hbase.index.util.ImmutableBytesPtr;
+import org.apache.phoenix.jdbc.PhoenixConnection;
+import org.apache.phoenix.jdbc.PhoenixStatement;
+import org.apache.phoenix.monitoring.ScanMetricsHolder;
+import org.apache.phoenix.query.QueryServices;
+import org.apache.phoenix.schema.PTableType;
+import org.apache.phoenix.schema.TableRef;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.Map;
+import java.util.Properties;
+
+import static org.apache.phoenix.util.TestUtil.PHOENIX_JDBC_URL;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+
+@Category(ParallelStatsDisabledTest.class)
+@SuppressWarnings("deprecated")
+public class MinimalQueryPlanInvolvedTableResultIteratorIT
+        extends ParallelStatsDisabledIT {
+
+    @Test
+    public void testTableResultIterator() throws Exception {
+        Connection conn = DriverManager.getConnection(PHOENIX_JDBC_URL);
+        PhoenixConnection phoenixConnection = 
conn.unwrap(PhoenixConnection.class);
+        phoenixConnection.setTableResultIteratorFactory(new 
MinimalQueryPlanInvolvedTableResultIteratorFactory());
+        String tableName = generateUniqueName();
+
+        conn.createStatement().execute("CREATE TABLE " + tableName
+                + " (A UNSIGNED_LONG NOT NULL PRIMARY KEY, B VARCHAR(10))");
+        conn.createStatement().execute("UPSERT INTO " + tableName + " VALUES 
(1, 'A')");
+        conn.createStatement().execute("UPSERT INTO " + tableName + " VALUES 
(2, 'B')");
+        conn.createStatement().execute("UPSERT INTO " + tableName + " VALUES 
(3, 'C')");
+        conn.createStatement().execute("UPSERT INTO " + tableName + " VALUES 
(4, 'D')");
+        conn.commit();
+
+        scanTable(conn, tableName);
+
+        Properties props = new Properties();
+        
props.setProperty(QueryServices.PHOENIX_SKIP_SYSTEM_TABLES_EXISTENCE_CHECK, 
"true");

Review Comment:
   @ankitsinghal sorry it's my bad. Added the changes in latest commit.





> Add support of skipping the system tables existence check during connection 
> initialisation and create new table result iterator which doesn't require 
> fetch meta data of table
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-6711
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-6711
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: Rajeshbabu Chintaguntla
>            Assignee: Rajeshbabu Chintaguntla
>            Priority: Major
>             Fix For: 5.1.2
>
>




--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to