From 291fb718ec87563166eb44aba35d8c71fec8fcd3 Mon Sep 17 00:00:00 2001 From: Noel Kwan Date: Wed, 30 Oct 2024 18:09:59 +0800 Subject: [PATCH] cleanup docs --- src/batch/src/error.rs | 3 ++- src/common/src/mysql.rs | 12 +++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/batch/src/error.rs b/src/batch/src/error.rs index b2e4d055956da..b0723277a6f5e 100644 --- a/src/batch/src/error.rs +++ b/src/batch/src/error.rs @@ -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; @@ -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", } diff --git a/src/common/src/mysql.rs b/src/common/src/mysql.rs index c1df361bf3a7b..c3ed3d9903764 100644 --- a/src/common/src/mysql.rs +++ b/src/common/src/mysql.rs @@ -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, @@ -68,7 +66,7 @@ pub fn mysql_datum_to_rw_datum( ) -> Result { match rw_data_type { DataType::Boolean => { - // Bit + // Bit(1) match mysql_row.take_opt::>, _>(mysql_datum_index) { None => bail!( "no value found at column: {}, index: {}",