Skip to content

Commit

Permalink
remove literal from columns
Browse files Browse the repository at this point in the history
  • Loading branch information
zshandy committed Apr 7, 2024
1 parent 2b05c53 commit 37eae6c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions lineagex/ColumnLineageNoConn.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,8 @@ def _handle_union(self, sql_ast: expressions = None) -> None:
cols = self._find_alias_col(
col_sql=col.sql(), temp_table=main_tables, ref=True
)
# print(col, cols[0], cols[1])
if col.dump()["args"]["this"]["args"]["quoted"] is True:
continue
self.all_used_col.extend(cols[0] + cols[1])
return

Expand Down Expand Up @@ -696,7 +697,7 @@ def _shared_col_conds(
temp_c = []
for k, v in dummy_dict.items():
temp_c.extend(list(itertools.chain.from_iterable(v)))
self.all_used_col.extend(list(set(temp_c)))
list(self.all_used_col).extend(list(set(temp_c)))
used_tables = self._find_all_tables(
temp_table_list=self._resolve_table(part_ast=temp_ast)
)
Expand All @@ -706,7 +707,7 @@ def _shared_col_conds(
cols = self._find_alias_col(
col_sql=cond_col.sql(), temp_table=used_tables, ref=True
)
self.all_used_col.extend(cols[0] + cols[1])
list(self.all_used_col).extend(cols[0] + cols[1])

def _find_alias_col(
self,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "lineagex"
version = "0.0.20"
version = "0.0.21"
description = "A column lineage tool"
authors = ["zshandy <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 37eae6c

Please sign in to comment.