Skip to content

Commit

Permalink
#536 fixed RowCacheStorage related bug that caused with SQLite usag…
Browse files Browse the repository at this point in the history
…e. List of column names and column types are now even in terms of their length.
  • Loading branch information
nicolay-r committed Dec 18, 2023
1 parent 76b4c1f commit ad4312c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion arekit/contrib/utils/data/storages/row_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@ def init_empty(self, columns_provider):

# Expand with columns that are forced to be provided.
existed_set = set(self.__column_names)
self.__column_names += [c for c in self.__force_collect_columns if c not in existed_set]

# Calculate extension: columns that were not mentioned in column names list.
extension = [c for c in self.__force_collect_columns if c not in existed_set]

self.__column_names += extension
self.__column_types += [str] * len(extension)

def iter_column_names(self):
return iter(self.__column_names)
Expand Down

0 comments on commit ad4312c

Please sign in to comment.