You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gcvctor doc clarifications for known traps (all documentation-only):
BytesValue(nil) vs BytesFromSlice(nil). The former returns non-null empty BYTES (base64 ""), the latter typed NULL — an easy trap when refactoring between them; only nullable_input.go hints at the distinction. Add a one-line cross-reference on BytesValue (and vice versa).
ArrayValue(vs...) with an empty slice silently yields ARRAY<INT64>. The zero-argument default is documented, but at a spread call site an empty slice of STRINGs materializes an INT64-typed empty array — a silent type bug. Steer the doc examples toward ArrayValueOf / EmptyArrayOf for slice-spread call sites.
StringBasedValueFromCode accepts ARRAY/STRUCT codes, producing a malformed simple Type (no array_element_type / struct_type); the doc only warns about NUMERIC normalization. Add "simple scalar codes only; ARRAY/STRUCT shapes require typector".
NullOf(nil) family normalizes to TYPE_CODE_UNSPECIFIED rather than erroring — deliberate and documented, but add a note that Spanner will reject the sentinel, so a nil-Type bug surfaces at the server, not at construction.
From the usability review accompanying the full-codebase review (#200-#214).
Problem
gcvctor doc clarifications for known traps (all documentation-only):
BytesValue(nil)vsBytesFromSlice(nil). The former returns non-null empty BYTES (base64 ""), the latter typed NULL — an easy trap when refactoring between them; only nullable_input.go hints at the distinction. Add a one-line cross-reference onBytesValue(and vice versa).ArrayValue(vs...)with an empty slice silently yieldsARRAY<INT64>. The zero-argument default is documented, but at a spread call site an empty slice of STRINGs materializes an INT64-typed empty array — a silent type bug. Steer the doc examples towardArrayValueOf/EmptyArrayOffor slice-spread call sites.StringBasedValueFromCodeaccepts ARRAY/STRUCT codes, producing a malformed simpleType(noarray_element_type/struct_type); the doc only warns about NUMERIC normalization. Add "simple scalar codes only; ARRAY/STRUCT shapes require typector".NullOf(nil)family normalizes toTYPE_CODE_UNSPECIFIEDrather than erroring — deliberate and documented, but add a note that Spanner will reject the sentinel, so a nil-Type bug surfaces at the server, not at construction.From the usability review accompanying the full-codebase review (#200-#214).