Skip to content

Commit

Permalink
fix: add more logging messages
Browse files Browse the repository at this point in the history
  • Loading branch information
yshalenyk committed May 15, 2021
1 parent d267b3d commit 9205217
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion spoonbill/stats.py
Expand Up @@ -240,9 +240,10 @@ def process_items(self, releases, with_preview=True):
else:
parent_table = self.current_table.parent
if pointer not in parent_table.arrays:
LOGGER.warning(_("Detected additional table: {}").format(pointer))
self.current_table.types[pointer] = ["array"]
# TODO: do we need to mark this table as additional
self._add_table(add_child_table(self.current_table, pointer, parent_key, key))
self._add_table(add_child_table(self.current_table, pointer, parent_key, key), pointer)

if parent_table.set_array(pointer, item):
should_split = len(item) >= self.table_threshold
Expand Down Expand Up @@ -278,9 +279,15 @@ def process_items(self, releases, with_preview=True):
root = get_root(self.current_table)
abs_pointer = separator.join((abs_path, key))
if self.current_table.is_combined:
LOGGER.debug(
_("Path %s is targeted to combined table %s") % (pointer, self.current_table.name)
)
pointer = separator + separator.join((parent_key, key))
abs_pointer = pointer
if abs_pointer not in root.combined_columns:
LOGGER.warning(
_("Detected additional column: {} in {} table").format(abs_pointer, root.name)
)
self.current_table.add_column(
pointer,
{"title": key},
Expand Down

0 comments on commit 9205217

Please sign in to comment.