Skip to content

test: Fix type error in test_create_table and test_update_table #104

@xiaozhiyan

Description

@xiaozhiyan

Hi there, I've pulled main branch at a6d98c3 and found that tests test_create_table and test_update_table would fail due to type error.

error[E0277]: can't compare `{integer}` with `chrono::DateTime<chrono::Utc>`
    --> crates/catalog/rest/src/catalog.rs:1281:9
     |
1281 |         assert_eq!(1657810967051, table.metadata().last_updated_ms());
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `{integer} == chrono::DateTime<chrono::Utc>`

error[E0277]: can't compare `{integer}` with `chrono::DateTime<chrono::Utc>`
    --> crates/catalog/rest/src/catalog.rs:1453:9
     |
1453 |         assert_eq!(1657810967051, table.metadata().last_updated_ms());
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `{integer} == chrono::DateTime<chrono::Utc>`

CI: https://github.com/apache/iceberg-rust/actions/runs/6978413094/job/18989781732

We may need to add .timestamp_millis() or use Utc.timestamp_millis_opt(1657810967051).unwrap() in the following two lines.

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