Skip to content

Commit 7647f89

Browse files
committed
Update rust parquet catalog with recent features
1 parent 99687ee commit 7647f89

File tree

9 files changed

+507
-104
lines changed

9 files changed

+507
-104
lines changed

Cargo.lock

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/adapters/tardis/src/replay.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ async fn gather_instruments_info(
104104

105105
pub async fn run_tardis_machine_replay_from_config(config_filepath: &Path) -> anyhow::Result<()> {
106106
tracing::info!("Starting replay");
107-
tracing::info!("Config filepath: {}", config_filepath.display());
107+
tracing::info!("Config filepath: {config_filepath:?}");
108108

109109
let config_data = fs::read_to_string(config_filepath).expect("Failed to read config file");
110110
let config: TardisReplayConfig =
@@ -122,7 +122,7 @@ pub async fn run_tardis_machine_replay_from_config(config_filepath: &Path) -> an
122122
})
123123
.unwrap_or_else(|| std::env::current_dir().expect("Failed to get current directory"));
124124

125-
tracing::info!("Output path: {}", path.display());
125+
tracing::info!("Output path: {path:?}");
126126

127127
let normalize_symbols = config.normalize_symbols.unwrap_or(true);
128128
tracing::info!("normalize_symbols={normalize_symbols}");
@@ -416,9 +416,9 @@ fn batch_and_write_bars(bars: Vec<Bar>, bar_type: &BarType, date: NaiveDate, pat
416416
};
417417

418418
let filepath = path.join(parquet_filepath_bars(bar_type, date));
419-
match write_batch_to_parquet(batch, &filepath, None) {
420-
Ok(()) => tracing::info!("File written: {}", filepath.display()),
421-
Err(e) => tracing::error!("Error writing {}: {e:?}", filepath.display()),
419+
match write_batch_to_parquet(batch, &filepath, None, None) {
420+
Ok(()) => tracing::info!("File written: {filepath:?}"),
421+
Err(e) => tracing::error!("Error writing {filepath:?}: {e:?}"),
422422
}
423423
}
424424

@@ -449,9 +449,9 @@ fn write_batch(
449449
path: &Path,
450450
) {
451451
let filepath = path.join(parquet_filepath(typename, instrument_id, date));
452-
match write_batch_to_parquet(batch, &filepath, None) {
453-
Ok(()) => tracing::info!("File written: {}", filepath.display()),
454-
Err(e) => tracing::error!("Error writing {}: {e:?}", filepath.display()),
452+
match write_batch_to_parquet(batch, &filepath, None, None) {
453+
Ok(()) => tracing::info!("File written: {filepath:?}"),
454+
Err(e) => tracing::error!("Error writing {filepath:?}: {e:?}"),
455455
}
456456
}
457457

crates/persistence/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ pyo3 = { workspace = true, optional = true }
3535
serde_json = { workspace = true }
3636
serde = { workspace = true }
3737
tokio = { workspace = true }
38+
anyhow = { workspace = true }
3839
thiserror = { workspace = true }
3940
parquet = { workspace = true }
4041
binary-heap-plus = "0.5.0"
@@ -46,6 +47,7 @@ datafusion = { version = "46.0.0", default-features = false, features = [
4647
"unicode_expressions",
4748
] }
4849
object_store = "0.11.2"
50+
walkdir = "2.5.0"
4951

5052
[dev-dependencies]
5153
nautilus-test-kit = { path = "../test_kit" }

0 commit comments

Comments
 (0)