class_docstr: Expression renderer for the Trino engine.
class_docstr_tok: ["Expression","renderer","for","the","Trino","engine","."]
docstr: Render a between expression for Trino. If the expression is a timestamp literal then wrap literals with timestamp.
docstr_tok: ["Render","a","between","expression","for","Trino",".","If","the","expression","is","a","timestamp","literal","then","wrap","literals","with","timestamp","."]
code: def visit_between_expr(
      self, node: SqlBetweenExpression
  ) -> SqlExpressionRenderResult:
      """Render a between expression for Trino. If the expression is a timestamp literal then wrap literals with timestamp."""
      rendered_column_arg = self.render_sql_expr(node.column_arg)
      rendered_start_expr = self.render_sql_expr(node.start_expr)
      rendered_end_expr = self.render_sql_expr(node.end_expr)
  
      bind_parameters = SqlBindParameters()
      bind_parameters = bind_parameters.combine(
          rendered_column_arg.bind_parameters
      )
      bind_parameters = bind_parameters.combine(
          rendered_start_expr.bind_parameters
      )
      bind_parameters = bind_parameters.combine(
          rendered_end_expr.bind_parameters
      )
  
      # Handle timestamp literals differently.
      if parse(rendered_start_expr.sql):
          sql = f"{rendered_column_arg.sql} BETWEEN timestamp {rendered_start_expr.sql} AND timestamp {rendered_end_expr.sql}"
      else:
          sql = f"{rendered_column_arg.sql} BETWEEN {rendered_start_expr.sql} AND {rendered_end_expr.sql}"
  
      return SqlExpressionRenderResult(
          sql=sql,
          bind_parameters=bind_parameters,
      )
  
imports: from __future__ import annotations
  from typing import Collection
  from dateutil.parser import parse
  from dbt_semantic_interfaces.enum_extension import assert_values_exhausted
  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.render.expr_renderer import DefaultSqlExpressionRenderer, SqlExpressionRenderer, SqlExpressionRenderResult
  from metricflow.sql.render.sql_plan_renderer import DefaultSqlQueryPlanRenderer
  from metricflow.sql.sql_bind_parameters import SqlBindParameters
  from metricflow.sql.sql_exprs import SqlBetweenExpression, SqlGenerateUuidExpression, SqlPercentileExpression, SqlPercentileFunctionType, SqlSubtractTimeIntervalExpression
label_desc: Use image node_id 5 for calling the TrinoSqlExpressionRenderer obj's underlying member method code with example usage: obj.visit_between_expr(node) and returns: SqlExpressionRenderResult