From d4a7daa6c03f6032d480210734508875fbd905fd Mon Sep 17 00:00:00 2001 From: ADBond <48208438+ADBond@users.noreply.github.com> Date: Thu, 3 Oct 2024 10:21:36 +0100 Subject: [PATCH] get column names that will appear in concat without instantiating --- splink/internals/term_frequencies.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/splink/internals/term_frequencies.py b/splink/internals/term_frequencies.py index 681f8aeb15..2c1e2462dd 100644 --- a/splink/internals/term_frequencies.py +++ b/splink/internals/term_frequencies.py @@ -58,9 +58,10 @@ def _join_tf_to_df_concat_sql(linker: Linker) -> str: tbl = colname_to_tf_tablename(col) select_cols.append(f"{tbl}.{col.tf_name}") - input_columns = linker._input_columns() + column_names_in_df_concat = linker._concat_table_column_names + aliased_concat_column_names = [ - f"__splink__df_concat.{col.name} AS {col.name}" for col in input_columns + f"__splink__df_concat.{col} AS {col}" for col in column_names_in_df_concat ] select_cols = aliased_concat_column_names + select_cols