Skip to content
1 change: 1 addition & 0 deletions arrow-avro/src/writer/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
use crate::codec::{AvroDataType, AvroField, Codec};
use crate::schema::{Fingerprint, Nullability, Prefix};
use arrow_array::cast::AsArray;
use arrow_array::types::RunEndIndexType;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Remove duplicate RunEndIndexType import—blocking compilation error E0252.

RunEndIndexType is imported on line 23 as a standalone import and again on line 32 within the grouped import block. This creates a duplicate definition in the module namespace, which violates Rust's name uniqueness requirement (E0252) and prevents compilation.

Remove the standalone import on line 23 and retain the grouped import on line 32:

 use crate::codec::{AvroDataType, AvroField, Codec};
 use crate::schema::{Fingerprint, Nullability, Prefix};
 use arrow_array::cast::AsArray;
-use arrow_array::types::RunEndIndexType;
 use arrow_array::types::{
     ArrowPrimitiveType, Date32Type, DurationMicrosecondType, DurationMillisecondType,
     DurationNanosecondType, DurationSecondType, Float32Type, Float64Type, Int16Type, Int32Type,
     Int64Type, IntervalDayTimeType, IntervalMonthDayNanoType, IntervalYearMonthType,
     Time32MillisecondType, Time64MicrosecondType, TimestampMicrosecondType,
     TimestampMillisecondType,
 };
 use arrow_array::types::{
     RunEndIndexType, Time32SecondType, TimestampNanosecondType, TimestampSecondType,
 };

Also applies to: 31-33

🤖 Prompt for AI Agents
In arrow-avro/src/writer/encoder.rs lines 23 and 31-33, there is a duplicate
import of RunEndIndexType causing Rust E0252; remove the standalone import on
line 23 and keep the grouped import block (line ~32) instead, and scan the
import block to ensure RunEndIndexType appears only once (remove any other
duplicates if present).

use arrow_array::types::{
ArrowPrimitiveType, Date32Type, DurationMicrosecondType, DurationMillisecondType,
DurationNanosecondType, DurationSecondType, Float32Type, Float64Type, Int16Type, Int32Type,
Expand Down
Loading