public static Field . Type convertFromKuduType ( Type kuduType ) { switch ( kuduType ) { case BINARY : return Field . Type . BYTE_ARRAY ; case BOOL : return Field . Type . BOOLEAN ; case DOUBLE : return Field . Type . DOUBLE ; case FLOAT : return Field . Type . FLOAT ; case INT8 : return Field . Type . BYTE ; case INT16 : return Field . Type . SHORT ; case INT32 : return Field . Type . INTEGER ; case INT64 : return Field . Type . LONG ; case STRING : return Field . Type . STRING ; case UNIXTIME_MICROS : return Field . Type . DATETIME ; default : if ( "DECIMAL" . equals ( kuduType . name ( ) ) ) { return Field . Type . DECIMAL ; } throw new UnsupportedOperationException ( "Unknown data type: " + kuduType . getName ( ) ) ; } }
Convert from Kudu type to SDC Field type