Skip to content

Commit

Permalink
fix: sync -> sink (#517)
Browse files Browse the repository at this point in the history
  • Loading branch information
tshauck authored May 27, 2024
1 parent ab5cda4 commit df9b672
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test-r.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Test R

on:
push:
paths:
- 'exon-r/**'

jobs:
test:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use exon_fasta::FASTASchemaBuilder;

use crate::{
logical_plan::ExonDataSinkLogicalPlanNode, physical_plan::object_store::parse_url,
sinks::FASTADataSync,
sinks::FASTADataSink,
};

pub struct ExomeExtensionPlanner {}
Expand Down Expand Up @@ -132,7 +132,7 @@ impl ExtensionPlanner for ExomeExtensionPlanner {
overwrite: false,
};

let sink = Arc::new(FASTADataSync::new(file_sink_config));
let sink = Arc::new(FASTADataSink::new(file_sink_config));
let sink_schema = FASTASchemaBuilder::default().build().file_schema().unwrap();

let data_sink = DataSinkExec::new(physical_plan, sink, sink_schema, None);
Expand Down
14 changes: 7 additions & 7 deletions exon/exon-core/src/sinks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,23 +74,23 @@ impl BatchSerializer for FASTASerializer {
}
}

pub struct FASTADataSync {
pub struct FASTADataSink {
file_sink_config: FileSinkConfig,
}

impl FASTADataSync {
impl FASTADataSink {
pub fn new(file_sink_config: FileSinkConfig) -> Self {
Self { file_sink_config }
}
}

impl Debug for FASTADataSync {
impl Debug for FASTADataSink {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("FASTADataSync").finish()
}
}

impl DisplayAs for FASTADataSync {
impl DisplayAs for FASTADataSink {
fn fmt_as(
&self,
_display_type: DisplayFormatType,
Expand All @@ -101,7 +101,7 @@ impl DisplayAs for FASTADataSync {
}

#[async_trait::async_trait]
impl DataSink for FASTADataSync {
impl DataSink for FASTADataSink {
fn as_any(&self) -> &dyn Any {
self
}
Expand Down Expand Up @@ -143,7 +143,7 @@ impl DataSink for FASTADataSync {
#[cfg(test)]
mod tests {
use crate::datasources::fasta::table_provider::ListingFASTATableOptions;
use crate::sinks::FASTADataSync;
use crate::sinks::FASTADataSink;
use crate::ExonSession;

use datafusion::datasource::listing::PartitionedFile;
Expand Down Expand Up @@ -180,7 +180,7 @@ mod tests {
overwrite: false,
};

let sink = FASTADataSync { file_sink_config };
let sink = FASTADataSink { file_sink_config };

let total_bytes = sink
.write_all(stream, &ctx.session.task_ctx())
Expand Down

0 comments on commit df9b672

Please sign in to comment.