Skip to content
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

feat: add meta_type config #8571

Merged
merged 14 commits into from
Nov 3, 2022
Merged

feat: add meta_type config #8571

merged 14 commits into from
Nov 3, 2022

Conversation

lichuang
Copy link
Contributor

@lichuang lichuang commented Nov 1, 2022

I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/

Summary

feat: add meta_type config

meta_type has these types: remote, Fallback and embedded, use Fallback as default.
Fallback is used for forward compatbility, that is:
First check embedded config, then endpoints, finally address.

Fixes #8455

@vercel
Copy link

vercel bot commented Nov 1, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
databend ⬜️ Ignored (Inspect) Nov 3, 2022 at 6:34AM (UTC)

@mergify mergify bot added the pr-feature this PR introduces a new feature to the codebase label Nov 1, 2022
src/query/config/src/inner.rs Outdated Show resolved Hide resolved
src/query/config/src/inner.rs Show resolved Hide resolved
src/query/config/src/outer_v0.rs Outdated Show resolved Hide resolved
src/query/config/src/outer_v0.rs Outdated Show resolved Hide resolved
Copy link
Member

@drmingdrmer drmingdrmer left a comment

Choose a reason for hiding this comment

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

It's able to serialize an enum directly(looks good in our case?):

#[derive(serde::Serialize, serde::Deserialize)]
enum Foo {
    #[serde(rename = "a")]
    A,
    #[serde(rename = "b")]
    B,
}

    let a = Foo::A;
    let s = serde_json::to_string(&a).unwrap();
    println!("{}", s); // "a"

src/query/config/src/inner.rs Outdated Show resolved Hide resolved
src/query/config/src/inner.rs Outdated Show resolved Hide resolved
@mergify mergify bot merged commit 2c3d9cd into databendlabs:main Nov 3, 2022
@lichuang lichuang deleted the meta_remote_config branch November 13, 2022 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-feature this PR introduces a new feature to the codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add config meta = "embedded|remote" to specify what meta-store to use
3 participants