kadirozde commented on code in PR #2428: URL: https://github.com/apache/phoenix/pull/2428#discussion_r3192325071
########## phoenix-core/src/test/java/org/apache/phoenix/compile/keyspace/algebra/Reference.java: ########## @@ -0,0 +1,128 @@ +/* + * 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.compile.keyspace.oracle; + +/** + * Reference implementation (oracle) of the key-space model's key-range extraction + * algorithm. Given an {@link AbstractExpression} tree over a schema with {@code nPk} + * primary-key dimensions, produces the {@link AbstractKeySpaceList} the algorithm + * should emit. + * <p> + * The purpose is differential testing: we compare the oracle's output against the + * production {@code WhereOptimizerV2} implementation's {@code KeySpaceList} to detect + * divergences. Any difference is either a production bug or an oracle bug — the oracle + * being shorter and directly derived from the design, the default suspect is production. Review Comment: This was fixed in a later commit — f5ea31db4 renamed the oracle subpackage to algebra and moved all 5 files (AbstractExpression, AbstractKeySpace, AbstractKeySpaceList, AbstractRange, Reference) from phoenix-core-client/src/main/java/.../keyspace/oracle/ to phoenix-core/src/test/java/.../keyspace/algebra/. The reference-model code no longer ships in the client jar, and the phoenix-core-client/src/main/java/.../keyspace/ tree now only contains the 7 production classes plus the scan/ subpackage. -- 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]
