Search in sources :

Example 16 with HiveJdbcConverter

use of org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.jdbc.HiveJdbcConverter in project hive by apache.

the class JDBCSortPushDownRule method matches.

public boolean matches(RelOptRuleCall call) {
    final Sort sort = call.rel(0);
    final HiveJdbcConverter conv = call.rel(1);
    for (RexNode currCall : sort.getSortExps()) {
        if (!JDBCRexCallValidator.isValidJdbcOperation(currCall, conv.getJdbcDialect())) {
            return false;
        }
    }
    return true;
}
Also used : JdbcSort(org.apache.calcite.adapter.jdbc.JdbcRules.JdbcSort) Sort(org.apache.calcite.rel.core.Sort) HiveJdbcConverter(org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.jdbc.HiveJdbcConverter) RexNode(org.apache.calcite.rex.RexNode)

Aggregations

HiveJdbcConverter (org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.jdbc.HiveJdbcConverter)16 RelNode (org.apache.calcite.rel.RelNode)5 RexNode (org.apache.calcite.rex.RexNode)4 HiveJoin (org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveJoin)4 Join (org.apache.calcite.rel.core.Join)3 HiveFilter (org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveFilter)3 DruidQuery (org.apache.calcite.adapter.druid.DruidQuery)2 JdbcFilter (org.apache.calcite.adapter.jdbc.JdbcRules.JdbcFilter)2 JdbcSort (org.apache.calcite.adapter.jdbc.JdbcRules.JdbcSort)2 InvalidRelException (org.apache.calcite.rel.InvalidRelException)2 Filter (org.apache.calcite.rel.core.Filter)2 JoinRelType (org.apache.calcite.rel.core.JoinRelType)2 HiveAggregate (org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveAggregate)2 HiveProject (org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveProject)2 HiveTableScan (org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveTableScan)2 HiveUnion (org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveUnion)2 ASTNode (org.apache.hadoop.hive.ql.parse.ASTNode)2 BigDecimal (java.math.BigDecimal)1 Collectors (java.util.stream.Collectors)1 JdbcAggregate (org.apache.calcite.adapter.jdbc.JdbcRules.JdbcAggregate)1