Skip to content

Commit

Permalink
fix: moves the selection of schema name inside method 'get_full_schem…
Browse files Browse the repository at this point in the history
…a_type'

Signed-off-by: zongz <[email protected]>
  • Loading branch information
zong-zhe committed Nov 24, 2023
1 parent 1b692b6 commit 60c5750
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions kclvm/api/src/service/service_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,7 @@ impl KclvmServiceImpl {

let exec_args = kclvm_runner::ExecProgramArgs::from_str(args_json.as_str());
for (_k, schema_ty) in get_full_schema_type(
if args.schema_name.is_empty() {
None
} else {
Some(&args.schema_name)
},
Some(&args.schema_name),
CompilationOptions {
k_files: exec_args.clone().k_filename_list,
loader_opts: Some(exec_args.get_load_program_options()),
Expand Down
2 changes: 1 addition & 1 deletion kclvm/query/src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ pub fn get_full_schema_type(
// Schema name filter
match schema_name {
Some(schema_name) => {
if schema_name == name {
if schema_name.is_empty() || schema_name == name {
result.insert(name.to_string(), schema_ty);
}
}
Expand Down

0 comments on commit 60c5750

Please sign in to comment.