[ https://issues.apache.org/jira/browse/IMPALA-7818?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Rogers resolved IMPALA-7818. --------------------------------- Resolution: Fixed > Standardize use of Expr predicates > ---------------------------------- > > Key: IMPALA-7818 > URL: https://issues.apache.org/jira/browse/IMPALA-7818 > Project: IMPALA > Issue Type: Improvement > Components: Frontend > Affects Versions: Impala 3.0 > Reporter: Paul Rogers > Assignee: Paul Rogers > Priority: Minor > > The {{Expr}} (expression) class in the frontend has many handy predicates > such as {{IS_BINARY_PREDICATE}} and so on. (Note the confusing terminology: > there are subclasses of {{Expr}} which are SQL predicates. The predicates > discussed here are those based on the Guava {{Predicate}} class.) > The class also has predicate-like methods: {{isLiteral()}} and > {{isNullLiteral()}}. As it has evolved, {{isNullLiteral()}} checks not only > for a null literal, but also a cast of a null to some type. These functions > are in the base class, but do their work by checking the type of the > expression. > It would be cleaner to make these methods into predicates with names that > follow their function: {{IS_LITERAL}}, and {{IS_NULL_VALUE}}. > Further, there are a few places in the code that check for a non-null literal > using an and of conditions, This would be cleaner using a new > {{IS_NON_NULL_LITERAL}} predicate. > These changes put us in position to add new predicates as a result of work in > the pipeline; this refactoring is done as a separate change to keep the other > commit smaller. -- This message was sent by Atlassian JIRA (v7.6.3#76005)