Commit d443103
fix: boolean round-trip test and CSV datetime loading errors (#1000)
This PR fixes two issues causing CI failures:
1. **Boolean Round Trip**: Adjusted the expected DataFrame in
`test_dataframe_round_trip_with_table_schema` to correctly handle
`pd.NA` returned by the connector for nullable boolean values, instead
of `None`.
2. **CSV Extreme Datetimes**: Implemented `cast_dataframe_for_csv` to
pre-format `DATETIME` and `TIMESTAMP` columns using `.isoformat()`
before CSV serialization. This ensures years before 1000 are zero-padded
(e.g., `0001-01-01`), avoiding invalid date string errors from BigQuery
when loading data.
---
*PR created automatically by Jules for task
[5793097527839411486](https://jules.google.com/task/5793097527839411486)
started by @chalmerlowe*
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: chalmer lowe <chalmerlowe@google.com>1 parent f1525d9 commit d443103
File tree
3 files changed
+65
-0
lines changed- pandas_gbq/load
- tests/system
3 files changed
+65
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
127 | 166 | | |
128 | 167 | | |
129 | 168 | | |
| |||
195 | 234 | | |
196 | 235 | | |
197 | 236 | | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
198 | 240 | | |
199 | 241 | | |
200 | 242 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
163 | 184 | | |
164 | 185 | | |
165 | 186 | | |
| |||
0 commit comments