Package org.apache.tajo.engine.exception

Examples of org.apache.tajo.engine.exception.InvalidQueryException


      block.resolveGroupingRequired();
      block.getTargetListManager().resolveAll();

      return topUnion;
    } else {
      throw new InvalidQueryException("Not support grouping");
    }
  }
View Full Code Here


        return union;
      }
    } catch (CloneNotSupportedException cnse) {
      LOG.error(cnse);
      throw new InvalidQueryException(cnse);
    }
  }
View Full Code Here

      LogicalNode node = stack.peek();
      if (node instanceof UnaryNode) {
        UnaryNode unary = (UnaryNode) node;
        unary.setChild(selNode.getChild());
      } else {
        throw new InvalidQueryException("Unexpected Logical Query Plan");
      }
    }

    return selNode;
  }
View Full Code Here

             nullSuppliers.add(leftTableName);
             nullSuppliers.add(rightTableName);

             // verify that these null suppliers are indeed in the left and right sets
             if (!rightTableSet.contains(nullSuppliers.get(0)) && !leftTableSet.contains(nullSuppliers.get(0))) {
                throw new InvalidQueryException("Incorrect Logical Query Plan with regard to outer join");
             }
             if (!rightTableSet.contains(nullSuppliers.get(1)) && !leftTableSet.contains(nullSuppliers.get(1))) {
                throw new InvalidQueryException("Incorrect Logical Query Plan with regard to outer join");
             }

          } else if (joinType == JoinType.LEFT_OUTER) {
             nullSuppliers.add(((ScanNode)joinNode.getRightChild()).getTableName());
             //verify that this null supplier is indeed in the right sub-tree
             if (!rightTableSet.contains(nullSuppliers.get(0))) {
                 throw new InvalidQueryException("Incorrect Logical Query Plan with regard to outer join");
             }
          } else if (joinType == JoinType.RIGHT_OUTER) {
            if (((ScanNode)joinNode.getRightChild()).getTableName().equals(rightTableName)) {
              nullSuppliers.add(leftTableName);
            } else {
              nullSuppliers.add(rightTableName);
            }

            // verify that this null supplier is indeed in the left sub-tree
            if (!leftTableSet.contains(nullSuppliers.get(0))) {
              throw new InvalidQueryException("Incorrect Logical Query Plan with regard to outer join");
            }
          }
        
         // retain in this outer join node's JoinQual those selection predicates
         // related to the outer join's null supplier(s)
View Full Code Here

        binaryParent.setRightChild(grandChild);
      } else {
        throw new IllegalStateException("ERROR: both logical node must be parent and child nodes");
      }
    } else {
      throw new InvalidQueryException("Unexpected logical plan: " + parent);
    }   
    return child;
  }
View Full Code Here

      String [] inner = getLineage(joinNode.getRightChild());

      Set<String> o = Sets.newHashSet(outer);
      Set<String> i = Sets.newHashSet(inner);
      if (outer == null || inner == null) {
        throw new InvalidQueryException("ERROR: Unexpected logical plan");
      }
      Iterator<String> it = tableIds.iterator();
      if (o.contains(it.next()) && i.contains(it.next())) {
        return true;
      }
View Full Code Here

  private Tuple tuple;

  public UnionExec(TaskAttemptContext context, PhysicalExec outer, PhysicalExec inner) {
    super(context, outer.getSchema(), inner.getSchema(), outer, inner);
    if (!outer.getSchema().equals(inner.getSchema())) {
      throw new InvalidQueryException(
          "The both schemas are not same");
    }
  }
View Full Code Here

      LogicalNode node = stack.peek();
      if (node instanceof UnaryNode) {
        UnaryNode unary = (UnaryNode) node;
        unary.setChild(selNode.getChild());
      } else {
        throw new InvalidQueryException("Unexpected Logical Query Plan");
      }
    } else { // if there remain search conditions

      // check if it can be evaluated here
      Set<EvalNode> matched = TUtil.newHashSet();
View Full Code Here

          nullSuppliers.add(leftTableName);
          nullSuppliers.add(rightTableName);

          // verify that these null suppliers are indeed in the left and right sets
          if (!rightTableSet.contains(nullSuppliers.get(0)) && !leftTableSet.contains(nullSuppliers.get(0))) {
            throw new InvalidQueryException("Incorrect Logical Query Plan with regard to outer join");
          }
          if (!rightTableSet.contains(nullSuppliers.get(1)) && !leftTableSet.contains(nullSuppliers.get(1))) {
            throw new InvalidQueryException("Incorrect Logical Query Plan with regard to outer join");
          }

        } else if (joinType == JoinType.LEFT_OUTER) {
          nullSuppliers.add(((RelationNode)joinNode.getRightChild()).getCanonicalName());
          //verify that this null supplier is indeed in the right sub-tree
          if (!rightTableSet.contains(nullSuppliers.get(0))) {
            throw new InvalidQueryException("Incorrect Logical Query Plan with regard to outer join");
          }
        } else if (joinType == JoinType.RIGHT_OUTER) {
          if (((RelationNode)joinNode.getRightChild()).getCanonicalName().equals(rightTableName)) {
            nullSuppliers.add(leftTableName);
          } else {
            nullSuppliers.add(rightTableName);
          }

          // verify that this null supplier is indeed in the left sub-tree
          if (!leftTableSet.contains(nullSuppliers.get(0))) {
            throw new InvalidQueryException("Incorrect Logical Query Plan with regard to outer join");
          }
        }

        // retain in this outer join node's JoinQual those selection predicates
        // related to the outer join's null supplier(s)
View Full Code Here

        binaryParent.setRightChild(grandChild);
      } else {
        throw new IllegalStateException("ERROR: both logical node must be parent and child nodes");
      }
    } else {
      throw new InvalidQueryException("Unexpected logical plan: " + parent);
    }
    return child;
  }
View Full Code Here

TOP

Related Classes of org.apache.tajo.engine.exception.InvalidQueryException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.