Skip to content

Add _escape_trino and alias _escape_presto to it (terminology consistency) #746

Description

@laughingman7743

Background

In pyathena/formatter.py the string-literal escapers are named _escape_presto (quote-doubling, ' -> '') and _escape_hive (backslash-escaping). Athena's query engine (engine v3) is Trino; "Presto" is the legacy name. For terminology consistency the quote-doubling helper should be named _escape_trino.

Caveat

_escape_presto / _escape_hive are underscore-prefixed (private), but external tooling such as dbt-athena is known to reference PyAthena internals, so a hard rename could break callers. The change should preserve _escape_presto as a working name.

Proposed approach

  • Add _escape_trino.
  • Consolidate the implementation in one function and make the other a thin wrapper that just calls it, so both names keep working (backward compatible).
  • Optionally mark _escape_presto as a deprecated alias in a comment/docstring, to be removed in a future major release.

No behavior change — naming/aliasing only.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions