Skip to content

Discussion: Support conversion of Arrow Int8 and Int16 to PrimitiveType::Int #783

Closed
@gruuya

Description

@gruuya

Presently only Int32 is converted into the corresponding Iceberg type Int

DataType::Int32 => Ok(Type::Primitive(PrimitiveType::Int)),

I'm wondering is there any downside in just adding Int8 and Int16 in there as well?

The spec suggests that it's fine to promote a smaller into a larger type (i.e. int to long), so this might be fine?

For context I'm working with a pyiceberg table, created from a parquet file with fields such as

  optional int32 cchar (INTEGER(8,true)) = 3;
  optional int32 cint2 (INTEGER(16,true)) = 4;

and thus the corresponding Arrow schema contains the above-mentioned types.

Related: apache/iceberg#2054

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions