@@ -182,7 +182,7 @@ void ParseIntegerVectorField(const ArrowArrayView* view, int64_t length,
182182template <typename Container, typename Accessor, typename Transfer>
183183 requires std::ranges::forward_range<Container> &&
184184 requires (Accessor& a, Container& c, Transfer& t, const ArrowArrayView* v,
185- int64_t key, int64_t offset) {
185+ int32_t key, int64_t offset) {
186186 std::invoke (a, *std::ranges::begin (c))[key] = std::invoke (t, v, offset);
187187 }
188188Status ParseIntMapField (Transfer transfer, ArrowType value_type,
@@ -206,7 +206,7 @@ Status ParseIntMapField(Transfer transfer, ArrowType value_type,
206206 auto begin_offset = view->buffer_views [1 ].data .as_int32 [row_idx];
207207 auto end_offset = view->buffer_views [1 ].data .as_int32 [row_idx + 1 ];
208208 for (int32_t offset = begin_offset; offset < end_offset; offset++) {
209- auto key = ArrowArrayViewGetIntUnsafe (key_view, offset);
209+ auto key = static_cast < int32_t >( ArrowArrayViewGetIntUnsafe (key_view, offset) );
210210 std::invoke (accessor, *iter)[key] = std::invoke (transfer, value_view, offset);
211211 }
212212 }
@@ -288,13 +288,15 @@ Result<std::vector<ManifestFile>> ParseManifestList(ArrowSchema* arrow_schema,
288288 ArrowArrayViewValidate (&view, NANOARROW_VALIDATION_LEVEL_FULL, &error), error);
289289
290290 ICEBERG_RETURN_UNEXPECTED (AssertViewTypeAndChildren (
291- &view, ArrowType::NANOARROW_TYPE_STRUCT, schema.fields ().size (), " manifest_list" ));
291+ &view, ArrowType::NANOARROW_TYPE_STRUCT,
292+ static_cast <int64_t >(schema.fields ().size ()), " manifest_list" ));
292293
293294 std::vector<ManifestFile> manifest_files;
294295 manifest_files.resize (array->length );
295296
296297 for (int64_t idx = 0 ; idx < array->n_children ; idx++) {
297- ICEBERG_ASSIGN_OR_RAISE (auto field, schema.GetFieldByIndex (idx));
298+ ICEBERG_ASSIGN_OR_RAISE (auto field,
299+ schema.GetFieldByIndex (static_cast <int32_t >(idx)));
298300 ICEBERG_CHECK (field.has_value (), " Invalid index {} for data file schema" , idx);
299301
300302 auto field_name = field->get ().name ();
@@ -397,15 +399,17 @@ Status ParsePartitionValues(ArrowArrayView* view, int64_t row_idx,
397399 } break ;
398400 case ArrowType::NANOARROW_TYPE_INT32: {
399401 auto value = ArrowArrayViewGetIntUnsafe (view, row_idx);
400- manifest_entries[row_idx].data_file ->partition .AddValue (Literal::Int (value));
402+ manifest_entries[row_idx].data_file ->partition .AddValue (
403+ Literal::Int (static_cast <int32_t >(value)));
401404 } break ;
402405 case ArrowType::NANOARROW_TYPE_INT64: {
403406 auto value = ArrowArrayViewGetIntUnsafe (view, row_idx);
404407 manifest_entries[row_idx].data_file ->partition .AddValue (Literal::Long (value));
405408 } break ;
406409 case ArrowType::NANOARROW_TYPE_FLOAT: {
407410 auto value = ArrowArrayViewGetDoubleUnsafe (view, row_idx);
408- manifest_entries[row_idx].data_file ->partition .AddValue (Literal::Float (value));
411+ manifest_entries[row_idx].data_file ->partition .AddValue (
412+ Literal::Float (static_cast <float >(value)));
409413 } break ;
410414 case ArrowType::NANOARROW_TYPE_DOUBLE: {
411415 auto value = ArrowArrayViewGetDoubleUnsafe (view, row_idx);
@@ -432,12 +436,13 @@ Status ParsePartitionValues(ArrowArrayView* view, int64_t row_idx,
432436Status ParseDataFile (const std::shared_ptr<StructType>& data_file_schema,
433437 ArrowArrayView* view, std::optional<int64_t >& first_row_id,
434438 std::vector<ManifestEntry>& manifest_entries) {
435- ICEBERG_RETURN_UNEXPECTED (
436- AssertViewTypeAndChildren ( view, ArrowType::NANOARROW_TYPE_STRUCT,
437- data_file_schema->fields ().size (), " data_file" ));
439+ ICEBERG_RETURN_UNEXPECTED (AssertViewTypeAndChildren (
440+ view, ArrowType::NANOARROW_TYPE_STRUCT,
441+ static_cast < int64_t >( data_file_schema->fields ().size () ), " data_file" ));
438442
439443 for (int64_t col_idx = 0 ; col_idx < view->n_children ; ++col_idx) {
440- ICEBERG_ASSIGN_OR_RAISE (auto field, data_file_schema->GetFieldByIndex (col_idx));
444+ ICEBERG_ASSIGN_OR_RAISE (
445+ auto field, data_file_schema->GetFieldByIndex (static_cast <int32_t >(col_idx)));
441446 ICEBERG_CHECK (field.has_value (), " Invalid index {} for data file schema" , col_idx);
442447 auto field_name = field->get ().name ();
443448 auto field_id = field->get ().field_id ();
@@ -600,7 +605,8 @@ Result<std::vector<ManifestEntry>> ParseManifestEntry(
600605 ArrowArrayViewValidate (&view, NANOARROW_VALIDATION_LEVEL_FULL, &error), error);
601606
602607 ICEBERG_RETURN_UNEXPECTED (AssertViewTypeAndChildren (
603- &view, ArrowType::NANOARROW_TYPE_STRUCT, schema.fields ().size (), " manifest_entry" ));
608+ &view, ArrowType::NANOARROW_TYPE_STRUCT,
609+ static_cast <int64_t >(schema.fields ().size ()), " manifest_entry" ));
604610
605611 std::vector<ManifestEntry> manifest_entries;
606612 manifest_entries.resize (array->length );
@@ -609,7 +615,8 @@ Result<std::vector<ManifestEntry>> ParseManifestEntry(
609615 }
610616
611617 for (int64_t col_idx = 0 ; col_idx < array->n_children ; col_idx++) {
612- ICEBERG_ASSIGN_OR_RAISE (auto field, schema.GetFieldByIndex (col_idx));
618+ ICEBERG_ASSIGN_OR_RAISE (auto field,
619+ schema.GetFieldByIndex (static_cast <int32_t >(col_idx)));
613620 ICEBERG_CHECK (field.has_value (), " Invalid column index {} for manifest entry schema" ,
614621 col_idx);
615622
0 commit comments