-
Notifications
You must be signed in to change notification settings - Fork 424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Rust] Datafusion Catalog Support #429
Conversation
3111d2d
to
3fb49c0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary indent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed by applying rustfmt
let np = Namespace { | ||
namespace: "default".to_string(), | ||
properties: serde_json::to_string(&LakeSoulTableProperty { | ||
hash_bucket_num: Some(4), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hash_bucket_num is a table property.
|
||
|
||
#[test_log::test] | ||
fn simple_sql_test() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be more SQL tests.
@@ -0,0 +1,386 @@ | |||
mod catalog_tests { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copy-right info is required.
use std::collections::HashMap; | ||
use std::sync::Arc; | ||
|
||
use std::sync::{Arc}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary bracket.
|
||
|
||
/// A metadata wrapper | ||
pub struct LakeSoulCatalog { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LakeSoulCatalog and LakeSoulNamespce can be separated from mod.rs.
rust/lakesoul-io/Cargo.toml
Outdated
@@ -33,11 +33,12 @@ hdrs = { git = "https://github.com/lakesoul-io/hdrs.git", branch = "main", featu | |||
lazy_static = "1.4.0" | |||
chrono = "0.4" | |||
serde_json = { workspace = true } | |||
log = { workspace = true } | |||
tracing = {version = "0.1.40"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tracing = "0.1.40"
Signed-off-by: mag1c1an1 <[email protected]>
Signed-off-by: mag1c1an1 <[email protected]>
Signed-off-by: mag1c1an1 <[email protected]>
Signed-off-by: mag1c1an1 <[email protected]>
Signed-off-by: mag1c1an1 <[email protected]>
Signed-off-by: mag1c1an1 <[email protected]>
Signed-off-by: mag1c1an1 <[email protected]>
Signed-off-by: mag1c1an1 <[email protected]>
Signed-off-by: mag1c1an1 <[email protected]>
Signed-off-by: mag1c1an1 <[email protected]>
Signed-off-by: mag1c1an1 <[email protected]>
&self, | ||
name: &str, | ||
schema: Arc<dyn SchemaProvider>, | ||
) -> lakesoul_io::lakesoul_io_config::Result<Option<Arc<dyn SchemaProvider>>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use datafusion::error::Result
@@ -89,7 +104,7 @@ impl MetaDataClient { | |||
} | |||
|
|||
async fn execute_insert(&self, insert_type: i32, wrapper: JniWrapper) -> Result<i32> { | |||
for times in 0..self.max_retry { | |||
for times in 0..self.max_retry as i64 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why i64
Close #424
Due to the restriction of datafusion's api,
CREATE EXTERNAL TABLE ...
is not supported.Supported SQL:
CREATE SCHEMA
;DROP TABLE
;SELECT ...
;SHOW TABLES
;SHOW COLUMNS