Package org.apache.drill.exec.exception

Examples of org.apache.drill.exec.exception.SchemaChangeException


    for (Ordering od : orderings) {
      // first, we rewrite the evaluation stack for each side of the comparison.
      ErrorCollector collector = new ErrorCollectorImpl();
      final LogicalExpression expr = ExpressionTreeMaterializer.materialize(od.getExpr(), batch, collector, context.getFunctionRegistry());
      if (collector.hasErrors()) {
        throw new SchemaChangeException("Failure while materializing expression. " + collector.toErrorString());
      }
      g.setMappingSet(leftMapping);
      HoldingContainer left = g.addExpr(expr, false);
      g.setMappingSet(rightMapping);
      HoldingContainer right = g.addExpr(expr, false);
View Full Code Here


    incoming.buildSchema();
    try {
      stats.startProcessing();
      setupNewSchema();
    } catch (Exception e) {
      throw new SchemaChangeException(e);
    } finally {
      stats.stopProcessing();
    }
    return IterOutcome.OK_NEW_SCHEMA;
  }
View Full Code Here

      hashJoinProbe = setupHashJoinProbe();
      // Build the container schema and set the counts
      container.buildSchema(BatchSchema.SelectionVectorMode.NONE);
      container.setRecordCount(outputRecords);
    } catch (IOException | ClassTransformationException e) {
      throw new SchemaChangeException(e);
    }
    return IterOutcome.OK_NEW_SCHEMA;
  }
View Full Code Here

        // Set the left named expression to be null if the probe batch is empty.
        if (leftUpstream != IterOutcome.OK_NEW_SCHEMA && leftUpstream != IterOutcome.OK) {
            leftExpr = null;
        } else {
          if (left.getSchema().getSelectionVectorMode() != BatchSchema.SelectionVectorMode.NONE) {
            throw new SchemaChangeException("Hash join does not support probe batch with selection vectors");
          }
        }

        HashTableConfig htConfig =
            new HashTableConfig(context.getOptions().getOption(ExecConstants.MIN_HASH_TABLE_SIZE_KEY).num_val.intValue(),
View Full Code Here

                case OK_NEW_SCHEMA:
                    if (rightSchema == null) {
                        rightSchema = right.getSchema();

                        if (rightSchema.getSelectionVectorMode() != BatchSchema.SelectionVectorMode.NONE) {
                          throw new SchemaChangeException("Hash join does not support build batch with selection vectors");
                        }
                        setupHashTable();
                    } else {
                      if (!rightSchema.equals(right.getSchema())) {
                        throw new SchemaChangeException("Hash join does not support schema changes");
                      }
                      hashTable.updateBatches();
                    }
                // Fall through
                case OK:
View Full Code Here

    right.buildSchema();
    try {
      allocateBatch(true);
      worker = generateNewWorker();
    } catch (IOException | ClassTransformationException e) {
      throw new SchemaChangeException(e);
    }
    return IterOutcome.OK_NEW_SCHEMA;
  }
View Full Code Here

          logger.debug("Creating New Worker");
          stats.startSetup();
          this.worker = generateNewWorker();
          first = true;
        } catch (ClassTransformationException | IOException | SchemaChangeException e) {
          context.fail(new SchemaChangeException(e));
          kill(false);
          return IterOutcome.STOP;
        } finally {
          stats.stopSetup();
        }
View Full Code Here

    container.clear();

    try {
      this.framer = createFramer();
    } catch (ClassTransformationException | IOException ex) {
      throw new SchemaChangeException("Failed to create framer: " + ex);
    }
    if (container.isSchemaChanged()) {
      container.buildSchema(BatchSchema.SelectionVectorMode.NONE);
      return true;
    }
View Full Code Here

      keyExprs[i] = expr;
    }

    if (collector.hasErrors()) {
      throw new SchemaChangeException("Failure while materializing expression. " + collector.toErrorString());
    }

    final ClassGenerator<StreamingWindowFramer> cg = CodeGenerator.getRoot(StreamingWindowFramer.TEMPLATE_DEFINITION, context.getFunctionRegistry());
    setupIsSame(cg, keyExprs);
    setupIsSameFromBatch(cg, keyExprs);
View Full Code Here

          case OK_NEW_SCHEMA:
            if (probeBatch.getSchema().equals(probeSchema)) {
              doSetup(outgoingJoinBatch.getContext(), buildBatch, probeBatch, outgoingJoinBatch);
              hashTable.updateBatches();
            } else {
              throw new SchemaChangeException("Hash join does not support schema changes");
            }
          case OK:
            recordsToProcess = probeBatch.getRecordCount();
            recordsProcessed = 0;
            // If we received an empty batch do nothing
View Full Code Here

TOP

Related Classes of org.apache.drill.exec.exception.SchemaChangeException

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.