This is an automated email from the ASF dual-hosted git repository.
diwu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-flink-connector.git
The following commit(s) were added to refs/heads/master by this push:
new 8722c3e8 [improve] modify type judgement statements (#405)
8722c3e8 is described below
commit 8722c3e8f543d2fc059622dc432c8cd6db7083c4
Author: xiayang <[email protected]>
AuthorDate: Wed Jun 26 14:20:26 2024 +0800
[improve] modify type judgement statements (#405)
---
.../java/org/apache/doris/flink/serialization/RowBatch.java | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git
a/flink-doris-connector/src/main/java/org/apache/doris/flink/serialization/RowBatch.java
b/flink-doris-connector/src/main/java/org/apache/doris/flink/serialization/RowBatch.java
index 81fe69e1..c7afe7f5 100644
---
a/flink-doris-connector/src/main/java/org/apache/doris/flink/serialization/RowBatch.java
+++
b/flink-doris-connector/src/main/java/org/apache/doris/flink/serialization/RowBatch.java
@@ -18,7 +18,6 @@
package org.apache.doris.flink.serialization;
import org.apache.flink.annotation.VisibleForTesting;
-import org.apache.flink.util.Preconditions;
import org.apache.arrow.memory.RootAllocator;
import org.apache.arrow.vector.BaseIntVector;
@@ -177,8 +176,14 @@ public class RowBatch {
final String currentType = schema.get(col).getType();
for (int rowIndex = 0; rowIndex < rowCountInOneBatch;
rowIndex++) {
boolean passed = doConvert(col, rowIndex, minorType,
currentType, fieldVector);
- Preconditions.checkArgument(
- passed, typeMismatchMessage(currentType,
minorType));
+ if (!passed) {
+ throw new java.lang.IllegalArgumentException(
+ "FLINK type is "
+ + currentType
+ + ", but arrow type is "
+ + minorType.name()
+ + ".");
+ }
}
}
} catch (Exception e) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]