Skip to content

Commit 6ae88d2

Browse files
committed
nit
1 parent 07675c4 commit 6ae88d2

File tree

2 files changed

+51
-2
lines changed

2 files changed

+51
-2
lines changed

fluss-lake/fluss-lake-iceberg/src/main/java/com/alibaba/fluss/lake/iceberg/tiering/FlussRecordAsIcebergRecord.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public Object get(int pos) {
126126
} else if (dataType instanceof TinyIntType) {
127127
return (int) internalRow.getByte(pos);
128128
} else if (dataType instanceof SmallIntType) {
129-
return internalRow.getShort(pos);
129+
return (int) internalRow.getShort(pos);
130130
} else if (dataType instanceof IntType) {
131131
return internalRow.getInt(pos);
132132
} else if (dataType instanceof BigIntType) {

fluss-lake/fluss-lake-iceberg/src/test/java/com/alibaba/fluss/lake/iceberg/tiering/IcebergTieringITCase.java

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,56 @@ void testTiering() throws Exception {
146146

147147
// then write data to the pk tables
148148
// write records
149-
rows = Arrays.asList(row(1, "v111"), row(2, "v222"), row(3, "v333"));
149+
rows =
150+
Arrays.asList(
151+
row(
152+
true,
153+
(byte) 100,
154+
(short) 200,
155+
1,
156+
1 + 400L,
157+
500.1f,
158+
600.0d,
159+
"v111",
160+
Decimal.fromUnscaledLong(900, 5, 2),
161+
Decimal.fromBigDecimal(new java.math.BigDecimal(1000), 20, 0),
162+
TimestampLtz.fromEpochMillis(1698235273400L),
163+
TimestampLtz.fromEpochMillis(1698235273400L, 7000),
164+
TimestampNtz.fromMillis(1698235273501L),
165+
TimestampNtz.fromMillis(1698235273501L, 8000),
166+
new byte[] {5, 6, 7, 8}),
167+
row(
168+
true,
169+
(byte) 100,
170+
(short) 200,
171+
2,
172+
2 + 400L,
173+
500.1f,
174+
600.0d,
175+
"v222",
176+
Decimal.fromUnscaledLong(900, 5, 2),
177+
Decimal.fromBigDecimal(new java.math.BigDecimal(1000), 20, 0),
178+
TimestampLtz.fromEpochMillis(1698235273400L),
179+
TimestampLtz.fromEpochMillis(1698235273400L, 7000),
180+
TimestampNtz.fromMillis(1698235273501L),
181+
TimestampNtz.fromMillis(1698235273501L, 8000),
182+
new byte[] {5, 6, 7, 8}),
183+
row(
184+
true,
185+
(byte) 100,
186+
(short) 200,
187+
3,
188+
3 + 400L,
189+
500.1f,
190+
600.0d,
191+
"v333",
192+
Decimal.fromUnscaledLong(900, 5, 2),
193+
Decimal.fromBigDecimal(new java.math.BigDecimal(1000), 20, 0),
194+
TimestampLtz.fromEpochMillis(1698235273400L),
195+
TimestampLtz.fromEpochMillis(1698235273400L, 7000),
196+
TimestampNtz.fromMillis(1698235273501L),
197+
TimestampNtz.fromMillis(1698235273501L, 8000),
198+
new byte[] {5, 6, 7, 8}));
150199
// write records
151200
writeRows(t1, rows, false);
152201

0 commit comments

Comments
 (0)