else if (SMALLINT.equals(type)) { short shortValue = resultSet.getShort(i); if (resultSet.wasNull()) {
private static boolean convertibleToDoubleWithCast(Type type) { return type instanceof DecimalType || DoubleType.DOUBLE.equals(type) || RealType.REAL.equals(type) || BigintType.BIGINT.equals(type) || IntegerType.INTEGER.equals(type) || SmallintType.SMALLINT.equals(type) || TinyintType.TINYINT.equals(type) || BooleanType.BOOLEAN.equals(type); } }
return ((Number) value).byteValue(); else if (SMALLINT.equals(type)) { return ((Number) value).shortValue();
fieldBuilders = ImmutableList.of(); else if (SMALLINT.equals(type)) { statisticsBuilder = new IntegerStatisticsBuilder(); fieldExtractor = ignored -> ImmutableList.of();
statement.setInt(parameter, toIntExact(type.getLong(block, position))); else if (SMALLINT.equals(type)) { statement.setShort(parameter, Shorts.checkedCast(type.getLong(block, position)));
return ImmutableList.of(new OrcType(OrcTypeKind.BYTE)); if (SMALLINT.equals(type)) { return ImmutableList.of(new OrcType(OrcTypeKind.SHORT));
private static boolean isValidPartitionType(Type type) { return type instanceof DecimalType || BOOLEAN.equals(type) || TINYINT.equals(type) || SMALLINT.equals(type) || INTEGER.equals(type) || BIGINT.equals(type) || REAL.equals(type) || DOUBLE.equals(type) || DATE.equals(type) || TIMESTAMP.equals(type) || isVarcharType(type) || isCharType(type); }
return new BooleanOrcPredicate(expectedValues, format == DWRF); if (TINYINT.equals(type) || SMALLINT.equals(type) || INTEGER.equals(type) || BIGINT.equals(type)) { return new LongOrcPredicate( expectedValues.stream()
return (int) type.getLong(block, position); if (SmallintType.SMALLINT.equals(type)) { return (short) type.getLong(block, position);
return HIVE_INT.getTypeInfo(); if (SMALLINT.equals(type)) { return HIVE_SHORT.getTypeInfo();
return byteEncoding(type); if (SMALLINT.equals(type)) { return shortEncoding(type);
longs[columnIndex] = tinyintPartitionKey(columnValue, name); else if (SMALLINT.equals(type)) { longs[columnIndex] = smallintPartitionKey(columnValue, name);
type.writeLong(blockBuilder, ((Number) value).intValue()); else if (SMALLINT.equals(type)) { type.writeLong(blockBuilder, ((Number) value).shortValue());
row.addInt(destChannel, (int) type.getLong(block, position)); else if (SMALLINT.equals(type)) { row.addShort(destChannel, (short) type.getLong(block, position));
if (SMALLINT.equals(type)) { if (isNull) { return NullableValue.asNull(SMALLINT);
type.writeLong(blockBuilder, ((Number) value).longValue()); else if (SMALLINT.equals(type)) { type.writeLong(blockBuilder, ((Number) value).longValue());
type.writeBoolean(blockBuilder, (Boolean) value); else if (TINYINT.equals(type) || SMALLINT.equals(type) || INTEGER.equals(type) || BIGINT.equals(type)) { type.writeLong(blockBuilder, ((Number) value).longValue());
parseLongColumn(column); else if (SMALLINT.equals(type)) { parseLongColumn(column);
return cursor.getLong(field); else if (SMALLINT.equals(type)) { return cursor.getLong(field);
assertInstanceOf(value, Byte.class); else if (SMALLINT.equals(column.getType())) { assertInstanceOf(value, Short.class);