joshelser commented on code in PR #1353:
URL: https://github.com/apache/phoenix/pull/1353#discussion_r843320069


##########
phoenix-core/src/main/java/org/apache/phoenix/util/SchemaUtil.java:
##########
@@ -595,25 +594,35 @@ public static boolean isSystemTable(byte[] fullTableName) 
{
         if (QueryConstants.SYSTEM_SCHEMA_NAME.equals(schemaName)) return true;
         return false;
     }
-    
-    // Given the splits and the rowKeySchema, find out the keys that 
-    public static byte[][] processSplits(byte[][] splits, 
LinkedHashSet<PColumn> pkColumns, Integer saltBucketNum, boolean 
defaultRowKeyOrder) throws SQLException {
-        // FIXME: shouldn't this return if splits.length == 0?
-        if (splits == null) return null;
-        // We do not accept user specified splits if the table is salted and 
we specify defaultRowKeyOrder. In this case,
-        // throw an exception.
-        if (splits.length > 0 && saltBucketNum != null && defaultRowKeyOrder) {
-            throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.NO_SPLITS_ON_SALTED_TABLE).build().buildException();
-        }

Review Comment:
   > I'm trying to double-check that it's intentional that you dropped throwing 
this exception
   
   Yes. The new code will automatically add the required split points for 
salting on top of what the user has provided, so there is need to forbid the 
user from doing that.
   
   
   > > found that merging the regions will break Phoenix, irrespective of the 
value of phoenix.query.force.rowkeyorder
   > 
   > Did you mean merging salt split points with user-provided split points 
(like I think this method was doing) or did you just mean general region 
merging?
   
   I was referring to merging regions containting data from separate buckets. 
   The user is free to merge regions as long as the buckets stay in separate 
regions.
   The mentioned test fails whether phoenix.query.force.rowkeyorder is set or 
not if those are merged.



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