Skip to content

Commit

Permalink
add simple sql test
Browse files Browse the repository at this point in the history
Signed-off-by: mag1c1an1 <[email protected]>
  • Loading branch information
mag1c1an1 committed Jan 23, 2024
1 parent cabc952 commit 42ae7dd
Show file tree
Hide file tree
Showing 6 changed files with 359 additions and 292 deletions.
1 change: 1 addition & 0 deletions rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions rust/lakesoul-datafusion/src/catalog/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,11 +287,17 @@ impl SchemaProvider for LakeSoulNamespace {
}

/// Search table by name
/// return LakesoulListing table
/// return LakeSoulListing table
async fn table(&self, name: &str) -> Option<Arc<dyn TableProvider>> {
if let Ok(t) = self.metadata_client.get_table_info_by_table_name(name, &self.namespace).await
{
let config = create_io_config_builder_from_table_info(Arc::new(t)).build();
let config;
if let Ok(config_builder) = create_io_config_builder(self.metadata_client.clone(), Some(name), true)
.await {
config = config_builder.build();
} else {
return None;
}
// Maybe should change
let file_format = Arc::new(LakeSoulParquetFormat::new(
Arc::new(ParquetFormat::new()),
Expand All @@ -301,6 +307,7 @@ impl SchemaProvider for LakeSoulNamespace {
&self.context.state(),
config,
file_format,
// TODO care this
false,
).await {
debug!("get table provider success");
Expand Down
Loading

0 comments on commit 42ae7dd

Please sign in to comment.