Commit b408399e authored by Vincent Pelletier's avatar Vincent Pelletier Committed by Eteri

ZSQLCatalog: Move catalog table registration out of ColumnMap.

registerCatalog method must be avoided whenever possible.
parent e681b15a
...@@ -416,7 +416,6 @@ class ColumnMap(object): ...@@ -416,7 +416,6 @@ class ColumnMap(object):
# now that we have all aliases, calculate missing joins comming from # now that we have all aliases, calculate missing joins comming from
# non-RelatedKey relationships (like full_text). # non-RelatedKey relationships (like full_text).
self.registerCatalog()
self._calculateMissingJoins() self._calculateMissingJoins()
# and all left joins that did not come from explicit queries # and all left joins that did not come from explicit queries
# (i.e. joins comming from 'sort_on', 'select_dict', etc.) # (i.e. joins comming from 'sort_on', 'select_dict', etc.)
......
...@@ -96,6 +96,9 @@ class EntireQuery(object): ...@@ -96,6 +96,9 @@ class EntireQuery(object):
) )
self.column_map = column_map self.column_map = column_map
if 1: if 1:
column_map.registerTable(
self.catalog_table_name,
)
for extra_column in self.extra_column_list: for extra_column in self.extra_column_list:
table, column = extra_column.replace('`', '').split('.') table, column = extra_column.replace('`', '').split('.')
if table != self.catalog_table_name: if table != self.catalog_table_name:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment