Skip to content

Vec<chrono::DateTime<Tz>> is not implemented for clickhouse_rs::types::Value #210

@1990heidou

Description

@1990heidou

The row! macro does not work properly when the field is Array(DateTime64),or maybe I am using it incorrectly.

fn push_to_block1(block: &mut Block) -> Result<(), Box<dyn Error>> {
    let mut events_t: Vec<DateTime<Tz>> = vec![];
    for _ in 0..3 {
        events_t.push(UTC.with_ymd_and_hms(2014, 7, 8, 14, 0, 0).unwrap());
    }
    block.push(row! {
         "Events.Timestamp" => events_t,
     });
    Ok(())
}

fn push_to_block2(block: &mut Block) -> Result<(), Box<dyn Error>> {
    let mut events_t: Vec<DateTime<Tz>> = vec![];
    for _ in 0..3 {
        events_t.push(UTC.with_ymd_and_hms(2014, 7, 8, 14, 0, 0).unwrap());
    }
    block.column("Events.Timestamp", vec![events_t]);
    Ok(())
}

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions