[ 
https://issues.apache.org/jira/browse/CALCITE-600?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14326656#comment-14326656
 ] 

Jesus Camacho Rodriguez commented on CALCITE-600:
-------------------------------------------------

The default factory creates {{LogicalUnion}} operators indeed; but now we can 
provide a factory that creates our own kind of operators that extend the base 
{{Union}} class. The matching will be based on the {{Union}} base class.

A given use case can be found in Hive. There is a {{HiveUnion}} operator that 
extends {{Union}}. I would like to use the UnionMerge rule in Hive. Without 
this extension, the only solution is to extend the rule and rewrite the 
{{match}} (and possibly {{transform}}) methods. Instead, now we will match on 
base class and providing the UnionFactory to create {{HiveUnion}} operators, as 
other rules already do.

> Create UnionFactory and use in rules containing Union operator
> --------------------------------------------------------------
>
>                 Key: CALCITE-600
>                 URL: https://issues.apache.org/jira/browse/CALCITE-600
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Jesus Camacho Rodriguez
>            Assignee: Jesus Camacho Rodriguez
>
> Union related rules match on {{LogicalUnion}} and use this implementation to 
> create the new Union operators. As it is done for other rules, a Union 
> factory can be created and used by them, so subclasses that extend Union can 
> use the rules.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to