Java Code Examples for org.apache.kudu.Type#BOOL
The following examples show how to use
org.apache.kudu.Type#BOOL .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractKuduProcessor.java From nifi with Apache License 2.0 | 5 votes |
/** * Converts a NiFi DataType to it's equivalent Kudu Type. */ private Type toKuduType(DataType nifiType) { switch (nifiType.getFieldType()) { case BOOLEAN: return Type.BOOL; case BYTE: return Type.INT8; case SHORT: return Type.INT16; case INT: return Type.INT32; case LONG: return Type.INT64; case FLOAT: return Type.FLOAT; case DOUBLE: return Type.DOUBLE; case DECIMAL: return Type.DECIMAL; case TIMESTAMP: return Type.UNIXTIME_MICROS; case CHAR: case STRING: return Type.STRING; default: throw new IllegalArgumentException(String.format("unsupported type %s", nifiType)); } }
Example 2
Source File: KuduTypeUtils.java From bahir-flink with Apache License 2.0 | 4 votes |
@Override public Type visit(BooleanType booleanType) { return Type.BOOL; }