omnata-plugin-runtime 0.10.6a238__tar.gz → 0.10.6a241__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: omnata-plugin-runtime
3
- Version: 0.10.6a238
3
+ Version: 0.10.6a241
4
4
  Summary: Classes and common runtime components for building and running Omnata Plugins
5
5
  Author: James Weakley
6
6
  Author-email: james.weakley@omnata.com
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "omnata-plugin-runtime"
3
- version = "0.10.6-a238"
3
+ version = "0.10.6-a241"
4
4
  description = "Classes and common runtime components for building and running Omnata Plugins"
5
5
  authors = ["James Weakley <james.weakley@omnata.com>"]
6
6
  readme = "README.md"
@@ -254,10 +254,15 @@ class SnowflakeViewColumn(BaseModel):
254
254
  for column in join_columns:
255
255
  for other_column in join_columns:
256
256
  if f'"{column.original_name}"' in other_column.expression:
257
- if column.original_name != column.name:
258
- other_column.expression = other_column.expression.replace(f'"{column.original_name}"',f'"{column.name}"')
259
257
  if column not in columns_to_move:
260
258
  columns_to_move.append(column)
259
+
260
+ # do another pass, this time replacing the original name with the transformed name
261
+ for column in join_columns:
262
+ for other_column in join_columns:
263
+ if f'"{column.original_name}"' in other_column.expression:
264
+ if column.original_name != column.name:
265
+ other_column.expression = other_column.expression.replace(f'"{column.original_name}"',f'"{column.name}"')
261
266
 
262
267
  # Move collected columns to the front
263
268
  for column in columns_to_move:
@@ -371,7 +376,7 @@ class SnowflakeViewPart(BaseModel):
371
376
  """
372
377
  Returns the columns that are not sourced from joins.
373
378
  """
374
- return [c for c in self.columns if not c.is_join_column]
379
+ return SnowflakeViewColumn.order_by_reference([c for c in self.columns if not c.is_join_column])
375
380
 
376
381
  def join_columns(self) -> List[SnowflakeViewColumn]:
377
382
  """