class_docstr: Renders the SQL query plan assuming ANSI SQL.
class_docstr_tok: ["Renders","the","SQL","query","plan","assuming","ANSI","SQL","."]
code: def visit_window_function_expr(
      self, node: SqlWindowFunctionExpression
  ) -> SqlExpressionRenderResult:  # noqa: D
      sql_function_args_rendered = [
          self.render_sql_expr(x) for x in node.sql_function_args
      ]
      partition_by_args_rendered = [
          self.render_sql_expr(x) for x in node.partition_by_args
      ]
      order_by_args_rendered = {
          self.render_sql_expr(x.expr): x for x in node.order_by_args
      }
  
      combined_params = SqlBindParameters()
      args_rendered = []
      if sql_function_args_rendered:
          args_rendered.extend(sql_function_args_rendered)
      if partition_by_args_rendered:
          args_rendered.extend(partition_by_args_rendered)
      if order_by_args_rendered:
          args_rendered.extend(list(order_by_args_rendered.keys()))
      for arg_rendered in args_rendered:
          combined_params = combined_params.combine(
              arg_rendered.bind_parameters
          )
  
      sql_function_args_string = ", ".join(
          [x.sql for x in sql_function_args_rendered]
      )
      partition_by_args_string = (
          (
              "PARTITION BY "
              + ", ".join([x.sql for x in partition_by_args_rendered])
          )
          if partition_by_args_rendered
          else ""
      )
      order_by_args_string = (
          (
              "ORDER BY "
              + ", ".join(
                  [
                      rendered_result.sql
                      + (f" {x.suffix}" if x.suffix else "")
                      for rendered_result, x in order_by_args_rendered.items()
                  ]
              )
              + " ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING"
          )
          if order_by_args_rendered
          else ""
      )
  
      window_string = " ".join(
          filter(bool, [partition_by_args_string, order_by_args_string])
      )
      return SqlExpressionRenderResult(
          sql=f"{node.sql_function.value}({sql_function_args_string}) OVER ({window_string})",
          bind_parameters=combined_params,
      )
  
imports: from __future__ import annotations
  import logging
  import textwrap
  from abc import ABC, abstractmethod
  from collections import namedtuple
  from dataclasses import dataclass
  from typing import Collection, List
  import jinja2
  from dbt_semantic_interfaces.type_enums.date_part import DatePart
  from dbt_semantic_interfaces.type_enums.time_granularity import TimeGranularity
  from typing_extensions import override
  from metricflow.sql.sql_bind_parameters import SqlBindParameters
  from metricflow.sql.sql_exprs import SqlAggregateFunctionExpression, SqlBetweenExpression, SqlCastToTimestampExpression, SqlColumnAliasReferenceExpression, SqlColumnReferenceExpression, SqlComparisonExpression, SqlDateTruncExpression, SqlExpressionNode, SqlExpressionNodeVisitor, SqlExtractExpression, SqlFunction, SqlGenerateUuidExpression, SqlIsNullExpression, SqlLogicalExpression, SqlNullExpression, SqlPercentileExpression, SqlPercentileFunctionType, SqlRatioComputationExpression, SqlStringExpression, SqlStringLiteralExpression, SqlSubtractTimeIntervalExpression, SqlWindowFunctionExpression
  from metricflow.sql.sql_plan import SqlSelectColumn
label_desc: Use image node_id 22 for calling the DefaultSqlExpressionRenderer obj's underlying member method code with example usage: obj.visit_window_function_expr(node) and returns: SqlExpressionRenderResult