Commit 0bccf6c
authored
Make total_rows available on RowIterator before iteration (#7622)
* Make total_rows available on RowIterator before iteration
After running a query, the total number of rows is available from the
call to the getQueryResults API. This commit plumbs the total rows
through to the faux Table created in QueryJob.results and then on
through to the RowIterator created by list_rows.
* Simplify RowIterator constructor. Add test comments.
Use getattr instead of protecting with hasattr in the RowIterator
constructor.
Add comments about intentionally conflicting values for total_rows.1 parent d8212f2 commit 0bccf6c
File tree
6 files changed
+105
-57
lines changed- bigquery
- docs
- google/cloud/bigquery
- tests/unit
6 files changed
+105
-57
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1908 | 1908 | | |
1909 | 1909 | | |
1910 | 1910 | | |
1911 | | - | |
1912 | | - | |
| 1911 | + | |
1913 | 1912 | | |
1914 | 1913 | | |
1915 | 1914 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2835 | 2835 | | |
2836 | 2836 | | |
2837 | 2837 | | |
| 2838 | + | |
2838 | 2839 | | |
2839 | 2840 | | |
2840 | 2841 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1308 | 1308 | | |
1309 | 1309 | | |
1310 | 1310 | | |
1311 | | - | |
1312 | 1311 | | |
1313 | | - | |
1314 | 1312 | | |
1315 | | - | |
1316 | | - | |
1317 | 1313 | | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
1318 | 1318 | | |
1319 | 1319 | | |
1320 | 1320 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4359 | 4359 | | |
4360 | 4360 | | |
4361 | 4361 | | |
4362 | | - | |
4363 | | - | |
4364 | | - | |
4365 | | - | |
4366 | | - | |
4367 | | - | |
4368 | | - | |
4369 | | - | |
4370 | | - | |
4371 | | - | |
| 4362 | + | |
| 4363 | + | |
| 4364 | + | |
| 4365 | + | |
| 4366 | + | |
| 4367 | + | |
| 4368 | + | |
| 4369 | + | |
4372 | 4370 | | |
4373 | | - | |
| 4371 | + | |
| 4372 | + | |
| 4373 | + | |
| 4374 | + | |
| 4375 | + | |
| 4376 | + | |
4374 | 4377 | | |
4375 | 4378 | | |
4376 | 4379 | | |
| |||
4573 | 4576 | | |
4574 | 4577 | | |
4575 | 4578 | | |
4576 | | - | |
| 4579 | + | |
4577 | 4580 | | |
4578 | 4581 | | |
4579 | 4582 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4024 | 4024 | | |
4025 | 4025 | | |
4026 | 4026 | | |
| 4027 | + | |
| 4028 | + | |
4027 | 4029 | | |
4028 | 4030 | | |
4029 | 4031 | | |
4030 | 4032 | | |
| 4033 | + | |
4031 | 4034 | | |
4032 | | - | |
| 4035 | + | |
| 4036 | + | |
| 4037 | + | |
| 4038 | + | |
| 4039 | + | |
| 4040 | + | |
| 4041 | + | |
| 4042 | + | |
4033 | 4043 | | |
4034 | 4044 | | |
4035 | 4045 | | |
4036 | 4046 | | |
4037 | 4047 | | |
4038 | 4048 | | |
4039 | | - | |
| 4049 | + | |
| 4050 | + | |
| 4051 | + | |
| 4052 | + | |
| 4053 | + | |
| 4054 | + | |
| 4055 | + | |
| 4056 | + | |
| 4057 | + | |
4040 | 4058 | | |
4041 | 4059 | | |
| 4060 | + | |
| 4061 | + | |
4042 | 4062 | | |
4043 | 4063 | | |
4044 | 4064 | | |
| |||
4052 | 4072 | | |
4053 | 4073 | | |
4054 | 4074 | | |
| 4075 | + | |
4055 | 4076 | | |
4056 | 4077 | | |
4057 | 4078 | | |
| |||
0 commit comments