class_docstr: Expression renderer for the DuckDB engine.
class_docstr_tok: ["Expression","renderer","for","the","DuckDB","engine","."]
docstr: Render time delta expression for DuckDB, which requires slightly different syntax from other engines.
docstr_tok: ["Render","time","delta","expression","for","DuckDB",",","which","requires","slightly","different","syntax","from","other","engines","."]
code: def visit_time_delta_expr(
      self, node: SqlSubtractTimeIntervalExpression
  ) -> SqlExpressionRenderResult:
      """Render time delta expression for DuckDB, which requires slightly different syntax from other engines."""
      arg_rendered = node.arg.accept(self)
  
      count = node.count
      granularity = node.granularity
      if granularity == TimeGranularity.QUARTER:
          granularity = TimeGranularity.MONTH
          count *= 3
  
      return SqlExpressionRenderResult(
          sql=f"{arg_rendered.sql} - INTERVAL {count} {granularity.value}",
          bind_parameters=arg_rendered.bind_parameters,
      )
  
file_path: metricflow/metricflow/sql/render/duckdb_renderer.py
imports: from __future__ import annotations
  from typing import Collection
  from dbt_semantic_interfaces.enum_extension import assert_values_exhausted
  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 SqlGenerateUuidExpression, SqlPercentileExpression, SqlPercentileFunctionType, SqlSubtractTimeIntervalExpression
label_desc: Use image node_id 2 for calling the DuckDbSqlExpressionRenderer obj's underlying member method code with example usage: obj.visit_time_delta_expr(node) and returns: SqlExpressionRenderResult