mihaibudiu commented on code in PR #4587:
URL: https://github.com/apache/calcite/pull/4587#discussion_r2450073956


##########
core/src/test/resources/sql/hep.iq:
##########
@@ -0,0 +1,113 @@
+# hep.iq - hep tests can customizable optimization rules for hep planner
+#
+# 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.
+#
+
+# This documents the required format for .iq files containing hep planner rule 
configurations
+#
+# SYNTAX:
+# ---------------
+# !set hep-rules "
+# +CoreRules.RULE_NAME1,
+# -CoreRules.RULE_NAME2,
+# +EnumerableRules.ENUMERABLE_RULE_NAME"
+#
+# FORMAT RULES:
+# -------------
+# 1. Must begin with: !set hep-rules " (double quote)
+# 2. Each rule must be on its own line. All lines except last must end with 
comma.
+#    The last rule line must close with " (double quote) on final line
+# 3. Rules must start with - (remove) or + (add)
+# 4. Rule prefix can be:
+#    - CoreRules.RULE_NAME -> added/removed from hep program
+#    - EnumerableRules.RULE_NAME -> added/removed from volcano program
+#    - RULE_NAME (no prefix) -> treated as CoreRules, added/removed from hep 
program
+# 5. Duplicate operations on the same rule: last operation wins
+#    Example: "+Rule1,+Rule1,-Rule1" results in rule being removed
+# 6. The optimizer uses a multi-program architecture where each program 
consists of
+#    optimization phases executed by a specific planner. Execution order:
+#    - HEP Program: executed by HepPlanner with configurable CoreRules.* rules
+#    - Volcano Program: executed by VolcanoPlanner with configurable 
EnumerableRules.* rules
+#    - Calc Program: executed by HepPlanner seeded with fixed 
RelOptRules.CALC_RULES

Review Comment:
   looks fine, but why not say
   ```
   - HEP program — executed by HepPlanner; initial rules set by CoreRules.* and 
modified by the !set hep-rules options
   ```
   
   



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