@@ -284,6 +284,37 @@ def test_w_record_subfield(self):
284284 coerced = self ._callFUT (rows , schema )
285285 self .assertEqual (coerced , expected )
286286
287+ def test_w_int64_float64 (self ):
288+ # "Standard" SQL dialect uses 'INT64', 'FLOAT64'.
289+ candidate = _Field ('REQUIRED' , 'candidate' , 'STRING' )
290+ votes = _Field ('REQUIRED' , 'votes' , 'INT64' )
291+ percentage = _Field ('REQUIRED' , 'percentage' , 'FLOAT64' )
292+ schema = [candidate , votes , percentage ]
293+ rows = [
294+ {'f' : [
295+ {'v' : 'Phred Phlyntstone' },
296+ {'v' : 8 },
297+ {'v' : 0.25 },
298+ ]},
299+ {'f' : [
300+ {'v' : 'Bharney Rhubble' },
301+ {'v' : 4 },
302+ {'v' : 0.125 },
303+ ]},
304+ {'f' : [
305+ {'v' : 'Wylma Phlyntstone' },
306+ {'v' : 20 },
307+ {'v' : 0.625 },
308+ ]},
309+ ]
310+ expected = [
311+ ('Phred Phlyntstone' , 8 , 0.25 ),
312+ ('Bharney Rhubble' , 4 , 0.125 ),
313+ ('Wylma Phlyntstone' , 20 , 0.625 ),
314+ ]
315+ coerced = self ._callFUT (rows , schema )
316+ self .assertEqual (coerced , expected )
317+
287318
288319class Test_ConfigurationProperty (unittest .TestCase ):
289320
0 commit comments