Skip to content

Commit 2c74671

Browse files
author
Devdutt Shenoi
committed
fix: construct filename for each request
1 parent aad03fd commit 2c74671

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/parseable/streams.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ impl Stream {
124124
if self.options.mode != Mode::Query || stream_type == StreamType::Internal {
125125
let filename =
126126
self.filename_by_partition(schema_key, parsed_timestamp, custom_partition_values);
127-
match guard.disk.get_mut(schema_key) {
127+
match guard.disk.get_mut(&filename) {
128128
Some(writer) => {
129129
writer.write(record)?;
130130
}
@@ -136,12 +136,12 @@ impl Stream {
136136
parsed_timestamp.and_local_timezone(Utc).unwrap(),
137137
OBJECT_STORE_DATA_GRANULARITY,
138138
);
139-
let file_path = self.data_path.join(filename);
139+
let file_path = self.data_path.join(&filename);
140140
let mut writer = DiskWriter::try_new(file_path, &record.schema(), range)
141141
.expect("File and RecordBatch both are checked");
142142

143143
writer.write(record)?;
144-
guard.disk.insert(schema_key.to_owned(), writer);
144+
guard.disk.insert(filename, writer);
145145
}
146146
};
147147
}

0 commit comments

Comments
 (0)