From 6cdf6b863b95758a17ee9e08e84c72c8534f8e6b Mon Sep 17 00:00:00 2001 From: yuzelin Date: Tue, 10 Dec 2024 14:00:05 +0800 Subject: [PATCH] [hotfix] Fix flaky test of orc tests in ArrowBatchConverterTest --- .../paimon/arrow/converter/ArrowBatchConverterTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/paimon-arrow/src/test/java/org/apache/paimon/arrow/converter/ArrowBatchConverterTest.java b/paimon-arrow/src/test/java/org/apache/paimon/arrow/converter/ArrowBatchConverterTest.java index c726283f0044..b9a8087a7078 100644 --- a/paimon-arrow/src/test/java/org/apache/paimon/arrow/converter/ArrowBatchConverterTest.java +++ b/paimon-arrow/src/test/java/org/apache/paimon/arrow/converter/ArrowBatchConverterTest.java @@ -910,8 +910,9 @@ private boolean isVectorizedWithDv(RecordReader.RecordIterator iter private Object[] randomRowValues(boolean[] nullable) { Object[] values = new Object[18]; - values[0] = BinaryString.fromString(StringUtils.getRandomString(RND, 10, 10)); - values[1] = BinaryString.fromString(StringUtils.getRandomString(RND, 1, 20)); + // The orc reader will trim the string. See TreeReaderFactory.CharTreeReader + values[0] = BinaryString.fromString(StringUtils.getRandomString(RND, 9, 9) + "A"); + values[1] = BinaryString.fromString(StringUtils.getRandomString(RND, 1, 19) + "A"); values[2] = RND.nextBoolean(); values[3] = randomBytes(10, 10); values[4] = randomBytes(1, 20);