stoty commented on code in PR #1493:
URL: https://github.com/apache/phoenix/pull/1493#discussion_r955727536
##########
phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java:
##########
@@ -929,12 +929,19 @@ private static boolean clipKeyRangeBytes(RowKeySchema
schema, int fieldIndex, in
* @throws SQLException
*/
private List<List<Scan>> getParallelScans(byte[] startKey, byte[] stopKey)
throws SQLException {
- List<HRegionLocation> regionLocations =
getRegionBoundaries(scanGrouper);
- List<byte[]> regionBoundaries = toBoundaries(regionLocations);
ScanRanges scanRanges = context.getScanRanges();
PTable table = getTable();
- boolean isSalted = table.getBucketNum() != null;
boolean isLocalIndex = table.getIndexType() == IndexType.LOCAL;
+ if(!isLocalIndex && scanRanges.isPointLookup()) {
Review Comment:
nit:This is rightfully flagged by checkstyle
##########
phoenix-core/src/it/java/org/apache/phoenix/end2end/salted/SaltedTableIT.java:
##########
@@ -62,6 +62,33 @@ public void testTableWithInvalidBucketNumber() throws
Exception {
}
}
+ @Test
+ public void testPointLookupOnSaltedTable() throws Exception {
+ Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+ try (Connection conn = DriverManager.getConnection(getUrl(), props);) {
+ String tableName = generateUniqueName();
+ String query = "create table " + tableName + " (a_integer integer
not null "
+ + "CONSTRAINT pk PRIMARY KEY (a_integer)) SALT_BUCKETS =
256";
Review Comment:
Doesn't creating this many regions slow down the test ?
--
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]