class_docstr: Renders the SQL query plan assuming ANSI SQL.
class_docstr_tok: ["Renders","the","SQL","query","plan","assuming","ANSI","SQL","."]
code: def _render_logical_arg(
      arg_rendered: SqlExpressionRenderResult,
      requires_parenthesis: bool,
      render_in_one_line: bool,
  ) -> str:
      # Put everything on 1 line for short expressions, but otherwise put one expression per line
      # Note: multi-line expressions are always enclosed in parentheses.
  
      # e.g.
      # Put everything on 1 line for short expressions like:
      #
      # (1 < 2) AND foo
      #
      # but for long expressions do:
      #
      #  (
      #    some_long_expression1
      #  ) AND (
      #    some_long_expression2
      #  ) AND (
      #    some_long_expression3
      # )
  
      if render_in_one_line:
          return (
              arg_rendered.sql
              if not requires_parenthesis
              else f"({arg_rendered.sql})"
          )
      else:
          return (
              jinja2.Template(
                  textwrap.dedent(
                      """\
                      (
                        {{ arg_sql | indent(2) }}
                      )
                      """
                  )
              )
              .render(arg_sql=arg_rendered.sql)
              .rstrip()
          )
  
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 13 for calling the DefaultSqlExpressionRenderer obj's underlying member method code with example usage: obj._render_logical_arg(arg_rendered, requires_parenthesis, render_in_one_line) and returns: unknown, jinja2