|
14 | 14 | ResultData,
|
15 | 15 | ServiceError,
|
16 | 16 | ExternalLink,
|
| 17 | + ChunkInfo, |
17 | 18 | )
|
18 | 19 |
|
19 | 20 |
|
@@ -43,15 +44,28 @@ def _parse_manifest(data: Dict[str, Any]) -> ResultManifest:
|
43 | 44 | """Parse manifest from response data."""
|
44 | 45 |
|
45 | 46 | manifest_data = data.get("manifest", {})
|
| 47 | + chunks = None |
| 48 | + if "chunks" in manifest_data: |
| 49 | + chunks = [ |
| 50 | + ChunkInfo( |
| 51 | + chunk_index=chunk.get("chunk_index", 0), |
| 52 | + byte_count=chunk.get("byte_count", 0), |
| 53 | + row_offset=chunk.get("row_offset", 0), |
| 54 | + row_count=chunk.get("row_count", 0), |
| 55 | + ) |
| 56 | + for chunk in manifest_data.get("chunks", []) |
| 57 | + ] |
| 58 | + |
46 | 59 | return ResultManifest(
|
47 | 60 | format=manifest_data.get("format", ""),
|
48 | 61 | schema=manifest_data.get("schema", {}),
|
49 | 62 | total_row_count=manifest_data.get("total_row_count", 0),
|
50 | 63 | total_byte_count=manifest_data.get("total_byte_count", 0),
|
51 | 64 | total_chunk_count=manifest_data.get("total_chunk_count", 0),
|
52 | 65 | truncated=manifest_data.get("truncated", False),
|
53 |
| - chunks=manifest_data.get("chunks"), |
| 66 | + chunks=chunks, |
54 | 67 | result_compression=manifest_data.get("result_compression"),
|
| 68 | + is_volume_operation=manifest_data.get("is_volume_operation"), |
55 | 69 | )
|
56 | 70 |
|
57 | 71 |
|
|
0 commit comments