switch (pinfo.getPrimitiveCategory()) { case BOOLEAN: return TypeDescription.createBoolean(); case BYTE: return TypeDescription.createByte();
switch (pinfo.getPrimitiveCategory()) { case BOOLEAN: return TypeDescription.createBoolean(); case BYTE: return TypeDescription.createByte();
break; case BOOLEAN: typeDescription.addField(colName, TypeDescription.createBoolean()); break; case TIMESTAMP:
private static TypeDescription convertType(final DataType fieldType) { if (fieldType instanceof BooleanType) { return TypeDescription.createBoolean(); } else if (fieldType instanceof ByteType) { return TypeDescription.createByte(); } else if (fieldType instanceof ShortType) { return TypeDescription.createShort(); } else if (fieldType instanceof IntType) { return TypeDescription.createInt(); } else if (fieldType instanceof LongType) { return TypeDescription.createLong(); } else if (fieldType instanceof FloatType) { return TypeDescription.createFloat(); } else if (fieldType instanceof DoubleType) { return TypeDescription.createDouble(); } else if (fieldType instanceof StringType || fieldType instanceof ByteArrayType) { return TypeDescription.createString(); } else if (fieldType instanceof DateType) { return TypeDescription.createDate(); } else if (fieldType instanceof TimestampType) { return TypeDescription.createTimestamp(); } else if (fieldType instanceof DecimalType) { int precision = ((DecimalType) fieldType).precision(); int scale = ((DecimalType) fieldType).scale(); return TypeDescription.createDecimal().withPrecision(precision).withScale(scale); } else { throw new UnsupportedOperationException("Unsupported category: " + fieldType); } } }
private TypeDescription determineOrcType( OrcSpec.DataType dataType ) { switch ( dataType ) { case BOOLEAN: return TypeDescription.createBoolean(); case TINYINT: return TypeDescription.createByte();
.addField("user", createString()) .addField("version", createLong()) .addField("visible", createBoolean());
public static TypeDescription convertTypeInfo(TypeDesc desc) { switch (desc.getDataType().getType()) { case BOOLEAN: return TypeDescription.createBoolean(); case BIT: return TypeDescription.createByte();
public static TypeDescription convertTypeInfo(TypeDesc desc) { switch (desc.getDataType().getType()) { case BOOLEAN: return TypeDescription.createBoolean(); case BIT: return TypeDescription.createByte();
switch (type.getKind()) { case BOOLEAN: return TypeDescription.createBoolean(); case BYTE: return TypeDescription.createByte();
switch (type.typeId()) { case BOOLEAN: result = TypeDescription.createBoolean(); break; case INTEGER: