Skip to content

Commit

Permalink
get_alter_table_statements -> get_alter_create_statements
Browse files Browse the repository at this point in the history
Co-authored-by: James Greenhill <[email protected]>
  • Loading branch information
tkaemming and fuziontech authored Aug 3, 2024
1 parent 2e3032c commit d8e5e0d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
operations = [
run_sql_with_exceptions(statement)
for statement in [
*sharded_events_property_groups.get_alter_table_statements("custom"),
*sharded_events_property_groups.get_alter_table_statements("feature_flags"),
*sharded_events_property_groups.get_alter_create_statements("custom"),
*sharded_events_property_groups.get_alter_create_statements("feature_flags"),
]
]
2 changes: 1 addition & 1 deletion posthog/clickhouse/property_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def register(self, name: str, definition: PropertyGroupDefinition) -> None:
def __get_map_expression(self, definition: PropertyGroupDefinition) -> str:
return f"mapSort(mapFilter((key, _) -> {definition.filter_expression}, CAST(JSONExtractKeysAndValues({self.__source_column}, 'String'), 'Map(String, String)')))"

def get_alter_table_statements(self, name: str) -> Iterable[str]:
def get_alter_create_statements(self, name: str) -> Iterable[str]:
column_name = f"{self.__source_column}_group_{name}"
definition = self.__groups[name]
return [
Expand Down

0 comments on commit d8e5e0d

Please sign in to comment.