omnata-plugin-runtime 0.11.1a316__tar.gz → 0.11.2a317__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.4
2
2
  Name: omnata-plugin-runtime
3
- Version: 0.11.1a316
3
+ Version: 0.11.2a317
4
4
  Summary: Classes and common runtime components for building and running Omnata Plugins
5
5
  License-File: LICENSE
6
6
  Author: James Weakley
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "omnata-plugin-runtime"
3
- version = "0.11.1-a316"
3
+ version = "0.11.2-a317"
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"
@@ -534,7 +534,8 @@ class SnowflakeViewParts(BaseModel):
534
534
  all_view_parts, ref_stream, ref_col
535
535
  ) for ref_col in ref_cols
536
536
  )
537
- return result
537
+ if result:
538
+ return True
538
539
  return False
539
540
 
540
541
  def view_body(self):
@@ -582,7 +583,18 @@ class SnowflakeViewParts(BaseModel):
582
583
  columns_only_referencing_own_stream.setdefault(part.stream_name, []).append(column.original_name)
583
584
  else:
584
585
  # if the column has no references, it can be included in the initial CTE for its own stream
585
- columns_only_referencing_own_stream.setdefault(part.stream_name, []).append(column.original_name)
586
+ # but only if no columns in other streams reference it
587
+ referenced_by_other_columns = False
588
+ for other_column in part.columns:
589
+ if other_column==column:
590
+ continue
591
+ if other_column.referenced_columns:
592
+ for ref_stream, ref_cols in other_column.referenced_columns.items():
593
+ if ref_stream != part.stream_name and column.original_name in ref_cols:
594
+ referenced_by_other_columns = True
595
+ break
596
+ if not referenced_by_other_columns:
597
+ columns_only_referencing_own_stream.setdefault(part.stream_name, []).append(column.original_name)
586
598
  # if this part has joins to other streams, we need to include the join columns
587
599
  for join in part.joins:
588
600
  all_referenced_columns.setdefault(join.join_stream_name, []).append(join.join_stream_column)