75767778798081
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"); }
79808182838485
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"); }
44454647484950
this(string.getBytes()); } @Override public boolean asBool() { throw new InvalidCastException(); }
49505152535455
throw new InvalidCastException(); } @Override public byte asByte() { throw new InvalidCastException(); }
291292293294295296297298
case TEXT: return new DateDatum(datum.asChars()); case DATE: return (DateDatum) datum; default: throw new InvalidCastException(datum.type() + " cannot be casted to DATE type"); } }
304305306307308309310311
case TEXT: return new TimeDatum(datum.asChars()); case TIME: return (TimeDatum) datum; default: throw new InvalidCastException(datum.type() + " cannot be casted to TIME type"); } }
315316317318319320321322
case TEXT: return new TimestampDatum(datum.asChars()); case TIMESTAMP: return (TimestampDatum) datum; default: throw new InvalidCastException(datum.type() + " cannot be casted to TIMESTAMP type"); } }
371372373374375376377378
case TIMESTAMP: return DatumFactory.createTimestamp(operandDatum); case BLOB: return DatumFactory.createBlob(operandDatum.asByteArray()); default: throw new InvalidCastException("Cannot cast " + operandDatum.type() + " to " + target.getType()); } }
42434445464748
val = bb.getLong(); } @Override public boolean asBool() { throw new InvalidCastException(); }
67686970717273
return val; } @Override public byte asByte() { throw new InvalidCastException(); }