Simplify read database table code by holicc · Pull Request #293 · roapi/roapi

@holicc

@holicc

houqp

@houqp

this is so much cleaner, thank you!

houqp

.map_err(|e| ColumnQError::Database(e.to_string()))?;
Ok(datafusion::datasource::MemTable::try_new(
destination.arrow_schema(),
vec![destination.arrow().unwrap()],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of doing an unwrap here, we should propagate the error to the caller instead so we don't crash the server

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes thank you! I will make another PR to fix this, since the previous PR has already been merged.