Skip to content

Commit 2bb4e81

Browse files
committed
remove uneeded code from writePrimitiveValuePreamble
1 parent 7875a71 commit 2bb4e81

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

flink-connector-clickhouse-base/src/main/java/com/clickhouse/utils/Serialize.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ public class Serialize {
1818
public static boolean writePrimitiveValuePreamble(OutputStream out, boolean defaultsSupport, boolean isNullable, ClickHouseDataType dataType, boolean hasDefault, String column) throws IOException {
1919
// since it is primitive we always have a value that is not null
2020
if (defaultsSupport) {
21+
// Add indicator since the table has default values
2122
SerializerUtils.writeNonNull(out);
22-
if (isNullable) {
23-
SerializerUtils.writeNonNull(out);
24-
}
25-
} else if (isNullable) {
23+
}
24+
// if the column is Nullable need to add an indicator for nullable
25+
if (isNullable) {
2626
SerializerUtils.writeNonNull(out);
2727
}
2828
return true;

0 commit comments

Comments
 (0)