Skip to content
Open
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
12 changes: 10 additions & 2 deletions tfbpapi/virtual_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -848,8 +848,16 @@ def add_col(col: str) -> None:
prop_result = self._resolve_property_columns(repo_id, config_name)
if prop_result is not None:
derived_exprs, prop_raw_cols = prop_result
# Ensure source columns needed by expressions are selected
for col in prop_raw_cols:
# Ensure source columns needed by expressions are selected.
# For external metadata datasets, restrict to columns that are
# physically present in the metadata parquet -- data columns
# (e.g. target_locus_tag) must not bleed into the meta view.
allowed_raw_cols = (
[c for c in prop_raw_cols if c in actual_meta_cols]
if is_external
else prop_raw_cols
)
for col in allowed_raw_cols:
add_col(col)
# Qualify source column references inside CASE WHEN expressions
if is_join:
Expand Down
Loading