Package org.apache.tajo.datum.exception

Examples of org.apache.tajo.datum.exception.InvalidCastException


  public float asFloat4() {
    throw new InvalidCastException(type + " cannot be casted to FLOAT type");
  }

  public double asFloat8() {
    throw new InvalidCastException(type + " cannot be casted to DOUBLE type");
  }
View Full Code Here


  public double asFloat8() {
    throw new InvalidCastException(type + " cannot be casted to DOUBLE type");
  }

  public String asChars() {
    throw new InvalidCastException(type + " cannot be casted to STRING type");
  }
View Full Code Here

    this(string.getBytes());
  }

  @Override
  public boolean asBool() {
    throw new InvalidCastException();
  }
View Full Code Here

    throw new InvalidCastException();
  }

  @Override
  public byte asByte() {
    throw new InvalidCastException();
  }
View Full Code Here

    case TEXT:
      return new DateDatum(datum.asChars());
    case DATE:
      return (DateDatum) datum;
    default:
      throw new InvalidCastException(datum.type() + " cannot be casted to DATE type");
    }
  }
View Full Code Here

    case TEXT:
      return new TimeDatum(datum.asChars());
    case TIME:
      return (TimeDatum) datum;
    default:
      throw new InvalidCastException(datum.type() + " cannot be casted to TIME type");
    }
  }
View Full Code Here

      case TEXT:
        return new TimestampDatum(datum.asChars());
      case TIMESTAMP:
        return (TimestampDatum) datum;
      default:
        throw new InvalidCastException(datum.type() + " cannot be casted to TIMESTAMP type");
    }
  }
View Full Code Here

    case TIMESTAMP:
      return DatumFactory.createTimestamp(operandDatum);
    case BLOB:
      return DatumFactory.createBlob(operandDatum.asByteArray());
    default:
      throw new InvalidCastException("Cannot cast " + operandDatum.type() + " to " + target.getType());
    }
  }
View Full Code Here

    val = bb.getLong();
  }

  @Override
  public boolean asBool() {
    throw new InvalidCastException();
  }
View Full Code Here

    return val;
  }

  @Override
  public byte asByte() {
    throw new InvalidCastException();
  }
View Full Code Here

TOP

Related Classes of org.apache.tajo.datum.exception.InvalidCastException

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.