Package org.apache.drill.common.exceptions

Examples of org.apache.drill.common.exceptions.DrillRuntimeException


  }
  public static CharSequence getChars(DataValue v){
    if(Types.isStringScalarType(v.getDataType())){
      return v.getAsStringValue().getString();
    }else{
      throw new DrillRuntimeException(String.format("Unable to get value.  %s is not a StringValue type.", v.getClass().getCanonicalName()));
    }
  }
View Full Code Here


    throw new IllegalArgumentException("You can't remove a value from a non-container type.");
  }

  @Override
  public NumericValue getAsNumeric() {
    throw new DrillRuntimeException(String.format("A %s value is not a NumericValue.", this.getClass().getCanonicalName()));
  }
View Full Code Here

    throw new DrillRuntimeException(String.format("A %s value is not a NumericValue.", this.getClass().getCanonicalName()));
  }

  @Override
  public ContainerValue getAsContainer() {
    throw new DrillRuntimeException(String.format("A %s value is not a ContainerValue.", this.getClass().getCanonicalName()));
  }
View Full Code Here

    throw new DrillRuntimeException(String.format("A %s value is not a ContainerValue.", this.getClass().getCanonicalName()));
  }

  @Override
  public StringValue getAsStringValue() {
    throw new DrillRuntimeException(String.format("A %s value is not a StringValue.", this.getClass().getCanonicalName()));
  }
View Full Code Here

  public StringValue getAsStringValue() {
    throw new DrillRuntimeException(String.format("A %s value is not a StringValue.", this.getClass().getCanonicalName()));
  }

  public BytesValue getAsBytesValue(){
    throw new DrillRuntimeException(String.format("A %s value is not a BytesValue.", this.getClass().getCanonicalName()));
  }
View Full Code Here

  public BytesValue getAsBytesValue(){
    throw new DrillRuntimeException(String.format("A %s value is not a BytesValue.", this.getClass().getCanonicalName()));
  }
 
  public BooleanValue getAsBooleanValue(){
    throw new DrillRuntimeException(String.format("A %s value is not a BooleanValue.", this.getClass().getCanonicalName()));
  }
View Full Code Here

        private void addRecord(WindowObjectHolder holder) {
            if (!isFull()) {
                holders.add(holder);
            } else {
                throw new DrillRuntimeException("Adding more records into windows then configured.");
            }
        }
View Full Code Here

                case ">":
                    return ((ComparableValue) leftVal).compareTo(rightVal) > 0;
                case ">=":
                    return ((ComparableValue) leftVal).compareTo(rightVal) >= 0;
                default:
                    throw new DrillRuntimeException("Relationship not supported: " + relationship);
            }
        }
View Full Code Here

        readAllFixedFields(fixedRecordsToRead, firstColumnStatus);
      }

      return firstColumnStatus.valuesReadInCurrentPass;
    } catch (IOException e) {
      throw new DrillRuntimeException(e);
    }
  }
View Full Code Here

  public HoldingContainer renderEnd(ClassGenerator<?> g, HoldingContainer[] inputVariables, JVar[]  workspaceJVars){
    //If the function's annotation specifies a parameter has to be constant expression, but the HoldingContainer
    //for the argument is not, then raise exception.
    for(int i =0; i < inputVariables.length; i++){
      if (parameters[i].isConstant && !inputVariables[i].isConstant()) {
        throw new DrillRuntimeException(String.format("The argument '%s' of Function '%s' has to be constant!", parameters[i].name, this.getRegisteredNames()[0]));
      }
    }
    generateBody(g, BlockType.SETUP, setupBody, inputVariables, workspaceJVars, true);
    HoldingContainer c = generateEvalBody(g, inputVariables, evalBody, workspaceJVars);
    generateBody(g, BlockType.RESET, resetBody, null, workspaceJVars, false);
View Full Code Here

TOP

Related Classes of org.apache.drill.common.exceptions.DrillRuntimeException

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.