Closed MedhaCS1010 closed 1 year ago
In my opinion adding the primitive support for boolean like we have for int64
and float64
will definitely going to be a performance gain as primitives are a bit faster and we don't have to construct new wrapper objects for each array element.
Int64
& Float64
as the wire type for boolean
is the primitive boolean, wee can just use proto.getBoolValue()
.@olavloite, can you please chime in and provide your thoughts here?
We already have boolean[] getBooleanArray(..)
. See https://github.com/googleapis/java-spanner/blob/028505b26f8da0541e8e281fc5f6646b469b332d/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbstractStructReader.java#L265 (ResultSet
extends from AbstractStructReader
)
We don't need a specific BoolArray
class for that, as the underlying values are already booleans.
Closing it here as we already have boolean[] getBooleanArray(..)
support. @MedhaCS1010 , please feel free to log new issues and enhancements request. Thank you!!
[Request/Enhancement] Abstract Result Set provides option to get array result as unmodifiable list for all the supported types but for primitive types like
int64
andfloat64
it also provides an option to get the result as array.Can we extend this functionality to support for
boolean
as well becausebool
is also a primitive?[Solution] We can add another BoolArray class similar to Int64Array
Will be happy to raise the PR for the same.