Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: tabVersion <tabvision@bupt.icu>
  • Loading branch information
tabVersion committed Mar 17, 2023
1 parent 81b284e commit 95d8dea
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/common/src/field_generator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,10 @@ mod tests {
#[test]
fn test_deterministic_timestamp() {
let seed = 1234;
let base_time: DateTime<FixedOffset> = DateTime::parse_from_rfc3339("2020-01-01T00:00:00+00:00").unwrap();
let mut generator = FieldGeneratorImpl::with_timestamp(Some(base_time), None, None, seed).unwrap();
let base_time: DateTime<FixedOffset> =
DateTime::parse_from_rfc3339("2020-01-01T00:00:00+00:00").unwrap();
let mut generator =
FieldGeneratorImpl::with_timestamp(Some(base_time), None, None, seed).unwrap();
let val1 = generator.generate_json(1);
let val2 = generator.generate_json(1);
assert_eq!(val1, val2);
Expand Down
1 change: 0 additions & 1 deletion src/common/src/field_generator/timestamp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ use serde_json::{json, Value};
use tracing::debug;

use super::DEFAULT_MAX_PAST;
use crate::array::Op;
use crate::types::{Datum, NaiveDateTimeWrapper, Scalar};

#[derive(Debug)]
Expand Down
1 change: 0 additions & 1 deletion src/connector/src/source/datagen/source/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ use std::collections::HashMap;

use anyhow::{anyhow, Result};
use async_trait::async_trait;
use chrono::{DateTime, FixedOffset};
use futures::{StreamExt, TryStreamExt};
use futures_async_stream::try_stream;
use risingwave_common::field_generator::FieldGeneratorImpl;
Expand Down

0 comments on commit 95d8dea

Please sign in to comment.