in pinot-common/src/main/java/org/apache/pinot/common/request/Literal.java [325:410]
protected void checkType(_Fields setField, java.lang.Object value) throws java.lang.ClassCastException {
switch (setField) {
case BOOL_VALUE:
if (value instanceof java.lang.Boolean) {
break;
}
throw new java.lang.ClassCastException("Was expecting value of type java.lang.Boolean for field 'boolValue', but got " + value.getClass().getSimpleName());
case BYTE_VALUE:
if (value instanceof java.lang.Byte) {
break;
}
throw new java.lang.ClassCastException("Was expecting value of type java.lang.Byte for field 'byteValue', but got " + value.getClass().getSimpleName());
case SHORT_VALUE:
if (value instanceof java.lang.Short) {
break;
}
throw new java.lang.ClassCastException("Was expecting value of type java.lang.Short for field 'shortValue', but got " + value.getClass().getSimpleName());
case INT_VALUE:
if (value instanceof java.lang.Integer) {
break;
}
throw new java.lang.ClassCastException("Was expecting value of type java.lang.Integer for field 'intValue', but got " + value.getClass().getSimpleName());
case LONG_VALUE:
if (value instanceof java.lang.Long) {
break;
}
throw new java.lang.ClassCastException("Was expecting value of type java.lang.Long for field 'longValue', but got " + value.getClass().getSimpleName());
case DOUBLE_VALUE:
if (value instanceof java.lang.Double) {
break;
}
throw new java.lang.ClassCastException("Was expecting value of type java.lang.Double for field 'doubleValue', but got " + value.getClass().getSimpleName());
case STRING_VALUE:
if (value instanceof java.lang.String) {
break;
}
throw new java.lang.ClassCastException("Was expecting value of type java.lang.String for field 'stringValue', but got " + value.getClass().getSimpleName());
case BINARY_VALUE:
if (value instanceof java.nio.ByteBuffer) {
break;
}
throw new java.lang.ClassCastException("Was expecting value of type java.nio.ByteBuffer for field 'binaryValue', but got " + value.getClass().getSimpleName());
case NULL_VALUE:
if (value instanceof java.lang.Boolean) {
break;
}
throw new java.lang.ClassCastException("Was expecting value of type java.lang.Boolean for field 'nullValue', but got " + value.getClass().getSimpleName());
case BIG_DECIMAL_VALUE:
if (value instanceof java.nio.ByteBuffer) {
break;
}
throw new java.lang.ClassCastException("Was expecting value of type java.nio.ByteBuffer for field 'bigDecimalValue', but got " + value.getClass().getSimpleName());
case FLOAT_VALUE:
if (value instanceof java.lang.Integer) {
break;
}
throw new java.lang.ClassCastException("Was expecting value of type java.lang.Integer for field 'floatValue', but got " + value.getClass().getSimpleName());
case INT_ARRAY_VALUE:
if (value instanceof java.util.List) {
break;
}
throw new java.lang.ClassCastException("Was expecting value of type java.util.List<java.lang.Integer> for field 'intArrayValue', but got " + value.getClass().getSimpleName());
case LONG_ARRAY_VALUE:
if (value instanceof java.util.List) {
break;
}
throw new java.lang.ClassCastException("Was expecting value of type java.util.List<java.lang.Long> for field 'longArrayValue', but got " + value.getClass().getSimpleName());
case FLOAT_ARRAY_VALUE:
if (value instanceof java.util.List) {
break;
}
throw new java.lang.ClassCastException("Was expecting value of type java.util.List<java.lang.Integer> for field 'floatArrayValue', but got " + value.getClass().getSimpleName());
case DOUBLE_ARRAY_VALUE:
if (value instanceof java.util.List) {
break;
}
throw new java.lang.ClassCastException("Was expecting value of type java.util.List<java.lang.Double> for field 'doubleArrayValue', but got " + value.getClass().getSimpleName());
case STRING_ARRAY_VALUE:
if (value instanceof java.util.List) {
break;
}
throw new java.lang.ClassCastException("Was expecting value of type java.util.List<java.lang.String> for field 'stringArrayValue', but got " + value.getClass().getSimpleName());
default:
throw new java.lang.IllegalArgumentException("Unknown field id " + setField);
}
}