GGraziadei commented on code in PR #16827: URL: https://github.com/apache/iceberg/pull/16827#discussion_r3785609483
########## core/src/test/java/org/apache/iceberg/util/TestHilbertByteUtils.java: ########## @@ -0,0 +1,135 @@ +/* + * 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.iceberg.util; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; + +import java.util.Set; +import org.apache.iceberg.relocated.com.google.common.collect.Sets; +import org.junit.jupiter.api.Test; + +public class TestHilbertByteUtils { Review Comment: Added `bijectionAndLocalityInThreeDimensions` (full 8-bit 256^3 sweep: bijection onto 1..2^24-1 plus L1 adjacency between consecutive indices) and `bijectionAndLocalityInFourDimensions` For 4-D, a full 8-bit enumeration is 2^ 32 points, so that test walks the (0,16)^4 sub-cube instead. Because only the low four bits of each axis are set, those points land on exactly the first 2^16 indices of the curve, verified contiguous, so bijection and adjacency are still checked exactly rather than sampled. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
