sanjeet006py commented on code in PR #2109:
URL: https://github.com/apache/phoenix/pull/2109#discussion_r2041472648


##########
phoenix-core/src/it/java/org/apache/phoenix/end2end/salted/SaltedTableWithParallelStatsEnabledIT.java:
##########
@@ -0,0 +1,366 @@
+/*
+ * 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.salted;
+
+import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.client.Admin;
+import org.apache.hadoop.hbase.client.Get;
+import org.apache.hadoop.hbase.client.RegionInfo;
+import org.apache.hadoop.hbase.client.Result;
+import org.apache.hadoop.hbase.client.ResultScanner;
+import org.apache.hadoop.hbase.client.Scan;
+import org.apache.hadoop.hbase.client.Table;
+import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.phoenix.end2end.ParallelStatsEnabledIT;
+import org.apache.phoenix.jdbc.PhoenixConnection;
+import org.apache.phoenix.query.QueryServices;
+import org.junit.Test;
+import org.junit.Assert;
+import org.junit.experimental.categories.Category;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.ResultSet;
+import java.sql.PreparedStatement;
+import java.sql.Statement;
+import java.util.List;
+import java.util.Properties;
+
+
+@Category(ParallelStatsEnabledIT.class)
+public class SaltedTableWithParallelStatsEnabledIT extends 
ParallelStatsEnabledIT {
+
+    private void testPhoenix7580(boolean withStatsForParallelization, boolean 
withFullTableScan,
+                                 boolean withPointLookups)
+            throws Exception {
+        String tableName = generateUniqueName();
+        int saltBucketCount = 5;
+        int rowsToInsert = saltBucketCount * 10;
+        String primaryKeyPrefix = "pk1_1";
+        // First 3 values are from salt bucket 0, next 3 are from salt bucket 
1 and so on
+        // till the last salt bucket. These values have been specifically 
selected so that
+        // we have values from all the 5 salt buckets.
+        int[] pk2ValuesForPointLookups = new int[]
+                { 4, 9, 13, 0, 5, 14, 1, 6, 10, 2, 7, 11, 3, 8, 12 };

Review Comment:
   As the comment says first 3 values are from 0th salt bucket and next 3 from 
1st salt bucket and so on. I wanted to keep all the values of a single salt 
bucket together for ease of testing.



-- 
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]

Reply via email to