Skip to content

Commit

Permalink
cleanup todos
Browse files Browse the repository at this point in the history
Signed-off-by: Bugen Zhao <[email protected]>
  • Loading branch information
BugenZhao committed Feb 5, 2024
1 parent 1bef70b commit 04f17ec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
19 changes: 8 additions & 11 deletions src/connector/src/parser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub use avro::AvroParserConfig;
pub use canal::*;
use csv_parser::CsvParser;
pub use debezium::*;
use futures::{Future, TryFutureExt, TryStreamExt};
use futures::{Future, TryFutureExt};
use futures_async_stream::try_stream;
pub use json_parser::*;
pub use protobuf::*;
Expand Down Expand Up @@ -572,15 +572,13 @@ impl<P: ByteStreamSourceParser> P {

// The parser stream will be long-lived. We use `instrument_with` here to create
// a new span for the polling of each chunk.
into_chunk_stream(self, data_stream)
.instrument_with(move || {
tracing::info_span!(
"source_parse_chunk",
actor_id = source_info.actor_id,
source_id = source_info.source_id.table_id()
)
})
.map_err(Into::into) // TODO(eh): remove this
into_chunk_stream(self, data_stream).instrument_with(move || {
tracing::info_span!(
"source_parse_chunk",
actor_id = source_info.actor_id,
source_id = source_info.source_id.table_id()
)
})
}
}

Expand Down Expand Up @@ -730,7 +728,6 @@ async fn into_chunk_stream<P: ByteStreamSourceParser>(mut parser: P, data_stream
}

pub trait AccessBuilder {
// TODO(eh)
async fn generate_accessor(&mut self, payload: Vec<u8>) -> anyhow::Result<AccessImpl<'_, '_>>;
}

Expand Down
1 change: 0 additions & 1 deletion src/connector/src/parser/protobuf/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,6 @@ fn recursive_parse_json(
serde_json::Value::Object(ret)
}

// TODO(eh): should use `AccessError`
pub fn from_protobuf_value(
field_desc: &FieldDescriptor,
value: &Value,
Expand Down

0 comments on commit 04f17ec

Please sign in to comment.