From 2a1d436de25023a981a45351cbc8fee80fa6ec91 Mon Sep 17 00:00:00 2001 From: NguyenHoangSon96 Date: Tue, 14 Apr 2026 14:35:07 +0700 Subject: [PATCH 1/3] docs: comments for write null fields --- .../influxdb/v3/client/InfluxDBClient.java | 28 +++++++++++++++++-- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/influxdb/v3/client/InfluxDBClient.java b/src/main/java/com/influxdb/v3/client/InfluxDBClient.java index 4ea1ea20..a2fbe5ce 100644 --- a/src/main/java/com/influxdb/v3/client/InfluxDBClient.java +++ b/src/main/java/com/influxdb/v3/client/InfluxDBClient.java @@ -78,7 +78,11 @@ public interface InfluxDBClient extends AutoCloseable { * @param point the {@link Point} to write, can be null *

* Note: the timestamp passed will be converted to nanoseconds since the Unix epoch - * by NanosecondConverter helper class + * by NanosecondConverter helper class.
+ * Warning: If you try to write ONLY ONE Point to Influxdb, but that Point has fields with null values, + * then these fields will NOT be written to Influxdb. + * In the following queries If you explicitly query these null fields like this: "Select normalField, nullField from my_table" + * error will be thrown. */ void writePoint(@Nullable final Point point); @@ -89,7 +93,13 @@ public interface InfluxDBClient extends AutoCloseable { * @param options the options for writing data to InfluxDB *

* Note: the timestamp passed will be converted to nanoseconds since the Unix epoch - * by NanosecondConverter helper class + * by NanosecondConverter helper class
+ * Note: the timestamp passed will be converted to nanoseconds since the Unix epoch + * by NanosecondConverter helper class.
+ * Warning: If you try to write ONLY ONE Point to Influxdb, but that Point has fields with null values, + * then these fields will NOT be written to Influxdb. + * In the following queries If you explicitly query these null fields like this: "Select normalField, nullField from my_table" + * error will be thrown. */ void writePoint(@Nullable final Point point, @Nonnull final WriteOptions options); @@ -99,7 +109,13 @@ public interface InfluxDBClient extends AutoCloseable { * @param points the list of {@link Point} to write, cannot be null *

* Note: the timestamp passed will be converted to nanoseconds since the Unix epoch - * by NanosecondConverter helper class + * by NanosecondConverter helper class
+ * Note: the timestamp passed will be converted to nanoseconds since the Unix epoch + * by NanosecondConverter helper class.
+ * Warning: If you try to write ONLY ONE Point to Influxdb, but that Point has fields with null values, + * then these fields will NOT be written to Influxdb. + * In the following queries If you explicitly query these null fields like this: "Select normalField, nullField from my_table" + * error will be thrown. */ void writePoints(@Nonnull final List points); @@ -111,6 +127,12 @@ public interface InfluxDBClient extends AutoCloseable { *

* Note: the timestamp passed will be converted to nanoseconds since the Unix epoch * by NanosecondConverter helper class + * Note: the timestamp passed will be converted to nanoseconds since the Unix epoch + * by NanosecondConverter helper class.
+ * Warning: If you try to write ONLY ONE Point to Influxdb, but that Point has fields with null values, + * then these fields will NOT be written to Influxdb. + * In the following queries If you explicitly query these null fields like this: "Select normalField, nullField from my_table" + * error will be thrown. */ void writePoints(@Nonnull final List points, @Nonnull final WriteOptions options); From 98a4854eb0a46a7ad37f950d0a457d7d3362fd35 Mon Sep 17 00:00:00 2001 From: NguyenHoangSon96 Date: Tue, 14 Apr 2026 14:42:41 +0700 Subject: [PATCH 2/3] chore: linter --- .../com/influxdb/v3/client/InfluxDBClient.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/influxdb/v3/client/InfluxDBClient.java b/src/main/java/com/influxdb/v3/client/InfluxDBClient.java index a2fbe5ce..08e41665 100644 --- a/src/main/java/com/influxdb/v3/client/InfluxDBClient.java +++ b/src/main/java/com/influxdb/v3/client/InfluxDBClient.java @@ -81,8 +81,8 @@ public interface InfluxDBClient extends AutoCloseable { * by NanosecondConverter helper class.
* Warning: If you try to write ONLY ONE Point to Influxdb, but that Point has fields with null values, * then these fields will NOT be written to Influxdb. - * In the following queries If you explicitly query these null fields like this: "Select normalField, nullField from my_table" - * error will be thrown. + * In the following queries If you explicitly query these null fields like this: + * "Select normalField, nullField from my_table" error will be thrown. */ void writePoint(@Nullable final Point point); @@ -98,8 +98,8 @@ public interface InfluxDBClient extends AutoCloseable { * by NanosecondConverter helper class.
* Warning: If you try to write ONLY ONE Point to Influxdb, but that Point has fields with null values, * then these fields will NOT be written to Influxdb. - * In the following queries If you explicitly query these null fields like this: "Select normalField, nullField from my_table" - * error will be thrown. + * In the following queries If you explicitly query these null fields like this: + * "Select normalField, nullField from my_table" error will be thrown. */ void writePoint(@Nullable final Point point, @Nonnull final WriteOptions options); @@ -114,8 +114,8 @@ public interface InfluxDBClient extends AutoCloseable { * by NanosecondConverter helper class.
* Warning: If you try to write ONLY ONE Point to Influxdb, but that Point has fields with null values, * then these fields will NOT be written to Influxdb. - * In the following queries If you explicitly query these null fields like this: "Select normalField, nullField from my_table" - * error will be thrown. + * In the following queries If you explicitly query these null fields like this: + * "Select normalField, nullField from my_table" error will be thrown. */ void writePoints(@Nonnull final List points); @@ -131,8 +131,8 @@ public interface InfluxDBClient extends AutoCloseable { * by NanosecondConverter helper class.
* Warning: If you try to write ONLY ONE Point to Influxdb, but that Point has fields with null values, * then these fields will NOT be written to Influxdb. - * In the following queries If you explicitly query these null fields like this: "Select normalField, nullField from my_table" - * error will be thrown. + * In the following queries If you explicitly query these null fields like this: + * "Select normalField, nullField from my_table" error will be thrown. */ void writePoints(@Nonnull final List points, @Nonnull final WriteOptions options); From 2b136158d9fa1cc9a1f6840b76570b1c76214d63 Mon Sep 17 00:00:00 2001 From: NguyenHoangSon96 Date: Tue, 14 Apr 2026 16:24:01 +0700 Subject: [PATCH 3/3] docs: make comments more descriptive and consistent --- .../influxdb/v3/client/InfluxDBClient.java | 43 +++++++++---------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/src/main/java/com/influxdb/v3/client/InfluxDBClient.java b/src/main/java/com/influxdb/v3/client/InfluxDBClient.java index 08e41665..ec7208cd 100644 --- a/src/main/java/com/influxdb/v3/client/InfluxDBClient.java +++ b/src/main/java/com/influxdb/v3/client/InfluxDBClient.java @@ -79,10 +79,11 @@ public interface InfluxDBClient extends AutoCloseable { *

* Note: the timestamp passed will be converted to nanoseconds since the Unix epoch * by NanosecondConverter helper class.
- * Warning: If you try to write ONLY ONE Point to Influxdb, but that Point has fields with null values, - * then these fields will NOT be written to Influxdb. - * In the following queries If you explicitly query these null fields like this: - * "Select normalField, nullField from my_table" error will be thrown. + * Warning: Fields with {@code null} values in a {@link Point} are not written to InfluxDB. + * + * If such fields are later queried explicitly, for example: + * {@code SELECT normalField, nullField FROM my_table} + * an error will be thrown. */ void writePoint(@Nullable final Point point); @@ -93,13 +94,12 @@ public interface InfluxDBClient extends AutoCloseable { * @param options the options for writing data to InfluxDB *

* Note: the timestamp passed will be converted to nanoseconds since the Unix epoch - * by NanosecondConverter helper class
- * Note: the timestamp passed will be converted to nanoseconds since the Unix epoch * by NanosecondConverter helper class.
- * Warning: If you try to write ONLY ONE Point to Influxdb, but that Point has fields with null values, - * then these fields will NOT be written to Influxdb. - * In the following queries If you explicitly query these null fields like this: - * "Select normalField, nullField from my_table" error will be thrown. + * Warning: Fields with {@code null} values in a {@link Point} are not written to InfluxDB. + * + * If such fields are later queried explicitly, for example: + * {@code SELECT normalField, nullField FROM my_table} + * an error will be thrown. */ void writePoint(@Nullable final Point point, @Nonnull final WriteOptions options); @@ -109,13 +109,11 @@ public interface InfluxDBClient extends AutoCloseable { * @param points the list of {@link Point} to write, cannot be null *

* Note: the timestamp passed will be converted to nanoseconds since the Unix epoch - * by NanosecondConverter helper class
- * Note: the timestamp passed will be converted to nanoseconds since the Unix epoch * by NanosecondConverter helper class.
- * Warning: If you try to write ONLY ONE Point to Influxdb, but that Point has fields with null values, - * then these fields will NOT be written to Influxdb. - * In the following queries If you explicitly query these null fields like this: - * "Select normalField, nullField from my_table" error will be thrown. + * Warning: If the provided list contains only one {@link Point}, and that {@code Point} + * contains fields with {@code null} values, those fields are not written to InfluxDB. + * If such fields are later queried explicitly, for example: + * {@code SELECT normalField, nullField FROM my_table} an error will be thrown. */ void writePoints(@Nonnull final List points); @@ -126,13 +124,14 @@ public interface InfluxDBClient extends AutoCloseable { * @param options the options for writing data to InfluxDB *

* Note: the timestamp passed will be converted to nanoseconds since the Unix epoch - * by NanosecondConverter helper class - * Note: the timestamp passed will be converted to nanoseconds since the Unix epoch * by NanosecondConverter helper class.
- * Warning: If you try to write ONLY ONE Point to Influxdb, but that Point has fields with null values, - * then these fields will NOT be written to Influxdb. - * In the following queries If you explicitly query these null fields like this: - * "Select normalField, nullField from my_table" error will be thrown. + * + * Warning: If the provided list contains only one {@link Point}, and that {@code Point} + * contains fields with {@code null} values, those fields are not written to InfluxDB. + * + * If such fields are later queried explicitly, for example: + * {@code SELECT normalField, nullField FROM my_table} + * an error will be thrown. */ void writePoints(@Nonnull final List points, @Nonnull final WriteOptions options);