Alessandro Solimando created HIVE-25884:
-------------------------------------------

             Summary: Improve rule description for subclasses of rules
                 Key: HIVE-25884
                 URL: https://issues.apache.org/jira/browse/HIVE-25884
             Project: Hive
          Issue Type: Improvement
          Components: CBO
    Affects Versions: 4.0.0
            Reporter: Alessandro Solimando
            Assignee: Alessandro Solimando


Consider the instances of _HivePointLookupOptimizerRule_ (for joins, filters 
and projects). 

They use the [default 
constructor|https://github.com/apache/calcite/blob/0065d7c179b98698f018f83b0af0845a6698fc54/core/src/main/java/org/apache/calcite/plan/RelOptRule.java#L79]
 for _RelOptRule_, which builds the rule description from the class name, and 
in case of nested classes, it takes only the inner class name.

In this case, the names do not refer to _HivePointLookupOptimizerRule_ and are 
too generic (e.g.,_FilerCondition_), it's hard to link them back to the rule 
they belong to without looking at the source code.

This is particularly problematic now that we have more detailed logging for CBO 
(see [HIVE-25816|https://issues.apache.org/jira/browse/HIVE-25816]), where rule 
descriptions are printed.

The aim of the PR is to improve the rule description by passing an explicit 
string whenever the rule (class) name alone is not enough.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to