Skip to content

Commit

Permalink
chore: fix typos in func && doc && comment (#19796)
Browse files Browse the repository at this point in the history
Signed-off-by: TBCCC <[email protected]>
  • Loading branch information
TBCCC authored Dec 19, 2024
1 parent c2389e2 commit 5cffd17
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/dev/src/design/relational-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ State Table provides the table operations by these APIs: `get_row`, `scan`, `ins

![Overview of Relational Table](../images/relational-table/relational-table-01.svg)
### Write Path
To write into KV state store, executors first perform operations on State Table, and these operations will be cached in Mem Table. Once a barrier flows through one executor, executor will flush the cached operations into state store. At this moment, State Table will covert these operations into kv pairs and write to state store with specific epoch.
To write into KV state store, executors first perform operations on State Table, and these operations will be cached in Mem Table. Once a barrier flows through one executor, executor will flush the cached operations into state store. At this moment, State Table will convert these operations into kv pairs and write to state store with specific epoch.

For example, an executor performs `insert(a, b, c)` and `delete(d, e, f)` through the State Table APIs, Mem Table first caches these two operations in memory. After receiving new barrier, State Table converts these two operations into KV operations by row-based format, and writes these KV operations into state store (Hummock).

Expand Down
4 changes: 2 additions & 2 deletions src/batch/executors/src/executor/source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,15 @@ impl SourceExecutor {
#[for_await]
for chunk in stream {
let chunk = chunk.map_err(BatchError::connector)?;
let data_chunk = covert_stream_chunk_to_batch_chunk(chunk)?;
let data_chunk = convert_stream_chunk_to_batch_chunk(chunk)?;
if data_chunk.capacity() > 0 {
yield data_chunk;
}
}
}
}

fn covert_stream_chunk_to_batch_chunk(chunk: StreamChunk) -> Result<DataChunk> {
fn convert_stream_chunk_to_batch_chunk(chunk: StreamChunk) -> Result<DataChunk> {
// chunk read from source must be compact
assert!(chunk.data_chunk().is_compacted());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ impl StorageCatalog {
Error::new(
ErrorKind::DataInvalid,
format!(
"Fail to covert version_hint from utf8 to string: {}",
"Fail to convert version_hint from utf8 to string: {}",
err.as_report()
),
)
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/handler/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ pub fn convert_interval_to_u64_seconds(interval: &String) -> RwResult<u64> {
let seconds = (Interval::from_str(interval)
.map_err(|err| {
ErrorCode::InternalError(format!(
"Covert interval to u64 error, please check format, error: {:?}",
"Convert interval to u64 error, please check format, error: {:?}",
err.to_report_string()
))
})?
Expand Down

0 comments on commit 5cffd17

Please sign in to comment.