Is your feature request related to a problem? Please describe.
I am unable to use (*spanner.Row).ToStruct() for a table with an ARRAY field because spanner.getGenericValue does not check for structpb.Value_ListValue type (which would map naturally to structpb.ListValue) and instead returns an error.
Describe the solution you'd like
Check for structpb.Value_ListValue (and structpb.Value_StructValue) and map to the appropriate return value within spanner.getGenericValue so that folks can use those corresponding underlying data types with custom decoding.
Describe alternatives you've considered
I changed the data type of that field in the interim, but that was only because this is a new, prototype table; anyone with a mature table they want to start using with this sdk would have to run a migration first, which is a relatively heavy-handed workaround when the real solution seems like a 4-line (two extra switch conditions) no-brainer fix.
Additional context
Add any other context or screenshots about the feature request here.
Is your feature request related to a problem? Please describe.
I am unable to use
(*spanner.Row).ToStruct()for a table with an ARRAY field becausespanner.getGenericValuedoes not check forstructpb.Value_ListValuetype (which would map naturally tostructpb.ListValue) and instead returns an error.Describe the solution you'd like
Check for
structpb.Value_ListValue(andstructpb.Value_StructValue) and map to the appropriate return value withinspanner.getGenericValueso that folks can use those corresponding underlying data types with custom decoding.Describe alternatives you've considered
I changed the data type of that field in the interim, but that was only because this is a new, prototype table; anyone with a mature table they want to start using with this sdk would have to run a migration first, which is a relatively heavy-handed workaround when the real solution seems like a 4-line (two extra
switchconditions) no-brainer fix.Additional context
Add any other context or screenshots about the feature request here.