This repository was archived by the owner on Mar 23, 2026. It is now read-only.
Description ResultSet getXXX returns default value instead of null for nullable fields.
BigQueryResultImpl implementation of getBoolean, getDouble, getLong should return null the same as others methods
Schema
Data (See row 4)
private fun ResultSet.getFieldValue (field : Field ): Any? {
val fieldName = field.name
return when (field.type.standardType) {
StandardSQLTypeName .BOOL -> getBoolean(fieldName)
StandardSQLTypeName .INT64 -> getLong(fieldName)
StandardSQLTypeName .FLOAT64 -> getDouble(fieldName)
StandardSQLTypeName .NUMERIC , StandardSQLTypeName .BIGNUMERIC -> getBigDecimal(fieldName)
StandardSQLTypeName .STRING -> getString(fieldName)
StandardSQLTypeName .BYTES -> getBytes(fieldName)
StandardSQLTypeName .TIMESTAMP -> getTimestamp(fieldName)?.toInstant()
StandardSQLTypeName .DATE -> getDate(fieldName)?.toLocalDate()?.atStartOfDay()?.toInstant(ZoneOffset .UTC )
StandardSQLTypeName .GEOGRAPHY -> getString(fieldName)?.toByteArray(StandardCharsets .UTF_8 )
StandardSQLTypeName .JSON -> getString(fieldName)
StandardSQLTypeName .INTERVAL -> getObject(fieldName)
StandardSQLTypeName .RANGE -> getObject(fieldName)
else -> getObject(fieldName)
}
}Reactions are currently unavailable
ResultSet
getXXXreturns default value instead ofnullfor nullable fields.BigQueryResultImpl implementation of
getBoolean,getDouble,getLongshould returnnullthe same as others methodsSchema

Data (See row 4)