@@ -88,8 +88,8 @@ TEST_F(SnapshotsTableTest, Scan) {
8888
8989 // Column 0: committed_at (timestamptz) — microseconds since epoch.
9090 auto committed_at = std::static_pointer_cast<::arrow::TimestampArray>(batch->column (0 ));
91- EXPECT_EQ (committed_at->Value (0 ), 1234567890000 * 1000 );
92- EXPECT_EQ (committed_at->Value (1 ), 9876543210000 * 1000 );
91+ EXPECT_EQ (committed_at->Value (0 ), 1234567890000LL * 1000 );
92+ EXPECT_EQ (committed_at->Value (1 ), 9876543210000LL * 1000 );
9393
9494 // Column 1: snapshot_id (long) — returned in storage order.
9595 auto snapshot_ids = std::static_pointer_cast<::arrow::Int64Array>(batch->column (1 ));
@@ -159,7 +159,7 @@ TEST_F(SnapshotsTableTest, ScanSkipsNullSnapshots) {
159159 EXPECT_EQ (batches.front ()->num_rows (), 2 );
160160}
161161
162- TEST_F (SnapshotsTableTest, ScanTreatsEmptySummaryAsNull ) {
162+ TEST_F (SnapshotsTableTest, ScanEmptySummary ) {
163163 auto [missing_summary, operation_only_summary] = MakeTestSnapshots ();
164164 missing_summary->summary .clear ();
165165 operation_only_summary->summary = {
@@ -176,12 +176,14 @@ TEST_F(SnapshotsTableTest, ScanTreatsEmptySummaryAsNull) {
176176 auto summaries =
177177 std::static_pointer_cast<::arrow::MapArray>(batches.front ()->column (5 ));
178178 EXPECT_TRUE (summaries->IsNull (0 ));
179- EXPECT_TRUE (summaries->IsNull (1 ));
179+ EXPECT_FALSE (summaries->IsNull (1 ));
180+ EXPECT_EQ (summaries->value_length (1 ), 0 );
180181}
181182
182183TEST_F (SnapshotsTableTest, ScanReturnsMultipleBatches) {
183184 auto snapshot = MakeTestSnapshots ().first ;
184- std::vector<std::shared_ptr<Snapshot>> snapshots (1025 , snapshot);
185+ std::vector<std::shared_ptr<Snapshot>> snapshots (MetadataTable::kBatchSize + 1 ,
186+ snapshot);
185187 ICEBERG_UNWRAP_OR_FAIL (auto table, MakeTableWithSnapshots (std::move (snapshots),
186188 /* current_snapshot_id=*/ 1 ));
187189 ICEBERG_UNWRAP_OR_FAIL (auto snapshots_table,
@@ -190,13 +192,14 @@ TEST_F(SnapshotsTableTest, ScanReturnsMultipleBatches) {
190192 ICEBERG_UNWRAP_OR_FAIL (auto stream, snapshots_table->Scan ());
191193 ICEBERG_UNWRAP_OR_FAIL (auto batches, ReadAllBatches (std::move (stream)));
192194 ASSERT_EQ (batches.size (), 2 );
193- EXPECT_EQ (batches[0 ]->num_rows (), 1024 );
195+ EXPECT_EQ (batches[0 ]->num_rows (), MetadataTable:: kBatchSize );
194196 EXPECT_EQ (batches[1 ]->num_rows (), 1 );
195197}
196198
197199TEST_F (SnapshotsTableTest, ScanUsesMetadataCapturedAtCreation) {
198200 auto snapshot = MakeTestSnapshots ().first ;
199- std::vector<std::shared_ptr<Snapshot>> snapshots (1025 , snapshot);
201+ std::vector<std::shared_ptr<Snapshot>> snapshots (MetadataTable::kBatchSize + 1 ,
202+ snapshot);
200203 ICEBERG_UNWRAP_OR_FAIL (auto table, MakeTableWithSnapshots (std::move (snapshots),
201204 /* current_snapshot_id=*/ 1 ));
202205 ICEBERG_UNWRAP_OR_FAIL (auto snapshots_table,
0 commit comments