Skip to content

Timestamp DataType does not work in schema #153

@rangp

Description

@rangp

I am trying to define a schema with a field of Timestamp Data type

var builder = new Apache.Arrow.Schema.Builder();
builder
    .Field(fb =>
    {
        fb.Name("id");
        fb.DataType(StringType.Default);
        fb.Nullable(false);
    })
    .Field(fb =>
    {
        fb.Name("time");
        fb.DataType(TimestampType.Default);
        fb.Nullable(false);
    });

var schema = builder.Build();

using var table = await engine.CreateTableAsync(
    new TableCreateOptions(baseUri.ToString(), schema)
    {
        PartitionBy = ["id"],
        StorageOptions = storageOptions,
    },
    CancellationToken.None);

But creating the table does not work with error:
Schema error: Invalid data type for Delta Lake: Timestamp(Millisecond, Some("+00:00"))'

Using just a string type, the table can be created successfully

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