Skip to content

Commit

Permalink
added conditional logic to use models from config where available in …
Browse files Browse the repository at this point in the history
…delivering schema
  • Loading branch information
gneeri committed Nov 21, 2024
1 parent 7c76643 commit 2eb6a78
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/calcite-schema/src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ use crate::version5::ParsedConfiguration;
// ANCHOR: get_schema
#[tracing::instrument(skip(configuration, calcite_ref), level=Level::INFO)]
pub fn get_schema(configuration: &ParsedConfiguration, calcite_ref: GlobalRef) -> Result<SchemaResponse> {
let data_models = get_models(&calcite_ref);
let data_models = match configuration.clone().metadata {
Some(metadata) => metadata,
None => get_models(&calcite_ref)
};

let scalar_types = scalars::scalars();
let (object_types, collections) = match collections::collections(&data_models, &scalar_types) {
Ok(value) => value,
Expand Down

0 comments on commit 2eb6a78

Please sign in to comment.