From 36604a02d25a253db13ebf53d7ba0c4a24a676af Mon Sep 17 00:00:00 2001 From: PhongChuong Date: Thu, 30 Jan 2025 14:21:26 -0500 Subject: [PATCH] feat: implement wasNull for BigQueryResultSet --- .../com/google/cloud/bigquery/BigQueryResultImpl.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryResultImpl.java b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryResultImpl.java index d3abf76ee..e1e129eae 100644 --- a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryResultImpl.java +++ b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryResultImpl.java @@ -30,6 +30,11 @@ import org.apache.arrow.vector.util.JsonStringArrayList; import org.apache.arrow.vector.util.Text; +/** + * An implementation of BigQueryResult. + * + *

This class and the ResultSet it returns is not thread-safe. + */ public class BigQueryResultImpl implements BigQueryResult { private static final String NULL_CURSOR_MSG = @@ -688,6 +693,11 @@ public Date getDate(int columnIndex) throws SQLException { } } + /** + * Returns whether the last column read had a value of SQL NULL. Note that you must first call + * one of the getter methods on a column to try to read its value and then call the method + * wasNull to see if the value read was SQL NULL. * + */ @Override public boolean wasNull() { return wasNull;