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

internal: Remove unneeded expression #2360

Merged
merged 1 commit into from
Mar 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions prql-compiler/src/semantic/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use anyhow::Result;
use enum_as_inner::EnumAsInner;
use itertools::Itertools;
use serde::{Deserialize, Serialize};
use std::collections::HashSet;
use std::{collections::HashMap, fmt::Debug};

use super::module::{Module, NS_DEFAULT_DB, NS_FRAME, NS_FRAME_RIGHT, NS_INFER, NS_SELF, NS_STD};
Expand Down Expand Up @@ -198,13 +197,11 @@ impl Context {
}

// fallback case: this variable can be from a namespace that we don't know all columns of
let decls = if ident.name != "*" {
let decls = {
self.root_mod.lookup(&Ident {
path: ident.path.clone(),
name: NS_INFER.to_string(),
})
} else {
HashSet::new()
};
match decls.len() {
0 => Err(format!("Unknown name {ident}")),
Expand Down