Skip to content

Commit

Permalink
cleanup docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kwannoel committed Oct 30, 2024
1 parent b8cc822 commit 291fb71
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
3 changes: 2 additions & 1 deletion src/batch/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use std::sync::Arc;

pub use anyhow::anyhow;
use iceberg::Error as IcebergError;
use mysql_async::Error as MySqlError;
use parquet::errors::ParquetError;
use risingwave_common::array::ArrayError;
Expand Down Expand Up @@ -194,7 +195,7 @@ def_anyhow_variant! {
BatchError ExternalSystemError,

PostgresError => "Postgres error",
iceberg::Error => "Iceberg error",
IcebergError => "Iceberg error",
ParquetError => "Parquet error",
MySqlError => "MySQL error",
}
12 changes: 5 additions & 7 deletions src/common/src/mysql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,10 @@ macro_rules! handle_data_type {
}

/// The decoding result can be interpreted as follows:
/// None => No value was found in the column.
/// Some(Ok(value)) => The value was found and successfully decoded.
/// Some(Err(error)) => The value was found but could not be decoded,
/// either because it was not supported,
/// or there was an error during conversion.
/// This error is wrapped via anyhow, so it is opaque.
/// Ok(value) => The value was found and successfully decoded.
/// Err(error) => The value was found but could not be decoded,
/// either because it was not supported,
/// or there was an error during conversion.
pub fn mysql_datum_to_rw_datum(
mysql_row: &mut MysqlRow,
mysql_datum_index: usize,
Expand All @@ -68,7 +66,7 @@ pub fn mysql_datum_to_rw_datum(
) -> Result<Datum, anyhow::Error> {
match rw_data_type {
DataType::Boolean => {
// Bit
// Bit(1)
match mysql_row.take_opt::<Option<Vec<u8>>, _>(mysql_datum_index) {
None => bail!(
"no value found at column: {}, index: {}",
Expand Down

0 comments on commit 291fb71

Please sign in to comment.