class_docstr: Helper class for constructing various join components in a SqlQueryPlan.
docstr: Helper to generate a renderable SqlExpression for expressing a time window join condition.
  
  The output will render the following expression:
  
      {start_dimension_name} >= metric_time AND ({end_dimension_name} < metric_time OR {end_dimension_name} IS NULL)
docstr_tok: ["Helper","to","generate","a","renderable","SqlExpression","for","expressing","a","time","window","join","condition",".","The","output","will","render","the","following","expression",":","{","start_dimension_name","}",">","=","metric_time","AND","(","{","end_dimension_name","}","<","metric_time","OR","{","end_dimension_name","}","IS","NULL",")"]
code: def _make_time_window_join_condition(
      left_source_alias: str,
      left_source_time_dimension_name: str,
      right_source_alias: str,
      window_start_dimension_name: str,
      window_end_dimension_name: str,
  ) -> SqlLogicalExpression:
      """Helper to generate a renderable SqlExpression for expressing a time window join condition.
  
      The output will render the following expression:
  
          {start_dimension_name} >= metric_time AND ({end_dimension_name} < metric_time OR {end_dimension_name} IS NULL)
  
      """
      left_time_column_expr = SqlColumnReferenceExpression(
          SqlColumnReference(
              table_alias=left_source_alias,
              column_name=left_source_time_dimension_name,
          )
      )
      window_start_column_expr = SqlColumnReferenceExpression(
          SqlColumnReference(
              table_alias=right_source_alias,
              column_name=window_start_dimension_name,
          )
      )
      window_end_column_expr = SqlColumnReferenceExpression(
          SqlColumnReference(
              table_alias=right_source_alias,
              column_name=window_end_dimension_name,
          )
      )
  
      window_start_condition = SqlComparisonExpression(
          left_expr=left_time_column_expr,
          comparison=SqlComparison.GREATER_THAN_OR_EQUALS,
          right_expr=window_start_column_expr,
      )
      window_end_by_time = SqlComparisonExpression(
          left_expr=left_time_column_expr,
          comparison=SqlComparison.LESS_THAN,
          right_expr=window_end_column_expr,
      )
      window_end_is_null = SqlIsNullExpression(window_end_column_expr)
      window_end_condition = SqlLogicalExpression(
          operator=SqlLogicalOperator.OR,
          args=(window_end_by_time, window_end_is_null),
      )
  
      return SqlLogicalExpression(
          operator=SqlLogicalOperator.AND,
          args=(window_start_condition, window_end_condition),
      )
  
imports: from __future__ import annotations
  from dataclasses import dataclass
  from typing import List, Optional, Sequence, Tuple
  from dbt_semantic_interfaces.protocols.metric import MetricTimeWindow
  from dbt_semantic_interfaces.type_enums.time_granularity import TimeGranularity
  from metricflow.assert_one_arg import assert_exactly_one_arg_set
  from metricflow.dataflow.dataflow_plan import JoinConversionEventsNode, JoinDescription, JoinOverTimeRangeNode, JoinToTimeSpineNode
  from metricflow.dataset.sql_dataset import SqlDataSet
  from metricflow.plan_conversion.sql_expression_builders import make_coalesced_expr
  from metricflow.sql.sql_exprs import SqlColumnReference, SqlColumnReferenceExpression, SqlComparison, SqlComparisonExpression, SqlDateTruncExpression, SqlIsNullExpression, SqlLogicalExpression, SqlLogicalOperator, SqlSubtractTimeIntervalExpression
  from metricflow.sql.sql_plan import SqlExpressionNode, SqlJoinDescription, SqlJoinType, SqlSelectStatementNode
label_desc: Use image node_id 4 for calling the SqlQueryPlanJoinBuilder obj's underlying member method code with example usage: obj._make_time_window_join_condition(left_source_alias, left_source_time_dimension_name, right_source_alias, window_start_dimension_name, window_end_dimension_name) and returns: SqlLogicalExpression