From e1506e09e1de359fa0180b208d52e9b006ec28bc Mon Sep 17 00:00:00 2001 From: Luke Sneeringer Date: Thu, 21 Sep 2017 06:48:49 -0700 Subject: [PATCH] Merge dates and timestamps properly. Fixes #3981 Fixes #3998 Closes #4009 --- spanner/google/cloud/spanner/streamed.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/spanner/google/cloud/spanner/streamed.py b/spanner/google/cloud/spanner/streamed.py index c7d950d766d7..36038c75462d 100644 --- a/spanner/google/cloud/spanner/streamed.py +++ b/spanner/google/cloud/spanner/streamed.py @@ -298,13 +298,15 @@ def _merge_struct(lhs, rhs, type_): _MERGE_BY_TYPE = { + type_pb2.ARRAY: _merge_array, type_pb2.BOOL: _unmergeable, - type_pb2.INT64: _merge_string, + type_pb2.BYTES: _merge_string, + type_pb2.DATE: _merge_string, type_pb2.FLOAT64: _merge_float64, + type_pb2.INT64: _merge_string, type_pb2.STRING: _merge_string, - type_pb2.ARRAY: _merge_array, type_pb2.STRUCT: _merge_struct, - type_pb2.BYTES: _merge_string, + type_pb2.TIMESTAMP: _merge_string, }