>From Ali Alsuliman <[email protected]>: Attention is currently required from: Shahrzad Shirazi.
Ali Alsuliman has posted comments on this change by Shahrzad Shirazi. ( https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21056?usp=email ) Change subject: [ASTERIXDB-3747][COMP] Introduce compiler property for hash-based OR threshold ...................................................................... Patch Set 6: (6 comments) File asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/CompilerProperties.java: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21056/comment/b8bf86f8_5b28ce17?usp=email : PS6, Line 174: "The threshold number of disjunctions required to justify using the hash-based OR approach"); We should probably get other opinions on the wording, but here is mine: The max number of disjunctions after which a hash-based approach is used for evaluating OR operation File asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/OptimizationConfUtil.java: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21056/comment/494c2901_e634583b?usp=email : PS6, Line 103: int hashBasedThreshold = getHashBasedORThreshold(compilerProperties, querySpecificConfig, sourceLoc); This is not used anywhere. Don't we need to pass it to the physOptConf? https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21056/comment/e5d048fb_db1c1f8b?usp=email : PS6, Line 264: : OptionTypes.INTEGER.parse(valueInQuery); You need to use the same type: ``` ((IOptionType<Integer>) CompilerProperties.COMPILER_DISJUNCTION_HASH_THRESHOLD.type()).parse(valueInQuery); ``` File asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/functions/FunctionTypeInferers.java: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21056/comment/f6df867a_e3413001?usp=email : PS6, Line 146: if (config.containsKey(CompilerProperties.COMPILER_DISJUNCTION_HASH_THRESHOLD)) { Call `config.get(CompilerProperties.COMPILER_DISJUNCTION_HASH_THRESHOLD)` and then check if `hashBasedOptionFromCompiler` != null. Also, rename `hashBasedOptionFromCompiler` -> `hashBasedOptionFromQuery` https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21056/comment/6024c96d_7a80d0d4?usp=email : PS6, Line 150: hashBasedThreshold = AlgebricksConfig.HASH_BASED_OR_THRESHOLD_DEFAULT; We should get the default from the compiler: ``` compilerProps.getHashBasedORThreshold() ``` https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21056/comment/64bd2e5a_a5424756?usp=email : PS6, Line 163: if (orArgs.size() < 2 || orArgs.size() < hashBasedThreshold || hashBasedThreshold < 0) { Make the check like this: ``` hashBasedThreshold < 0 || orArgs.size() < 2 || orArgs.size() < hashBasedThreshold ``` -- To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21056?usp=email To unsubscribe, or for help writing mail filters, visit https://asterix-gerrit.ics.uci.edu/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: asterixdb Gerrit-Branch: phoenix Gerrit-Change-Id: If65b44c0a8ae36a6643397395fdab21b0174d5ea Gerrit-Change-Number: 21056 Gerrit-PatchSet: 6 Gerrit-Owner: Shahrzad Shirazi <[email protected]> Gerrit-Reviewer: Anon. E. Moose #1000171 Gerrit-Reviewer: Jenkins <[email protected]> Gerrit-CC: Ali Alsuliman <[email protected]> Gerrit-Attention: Shahrzad Shirazi <[email protected]> Gerrit-Comment-Date: Fri, 27 Mar 2026 23:05:58 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No
