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.
Background
In
pyathena/formatter.pythe 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_hiveare 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_prestoas a working name.Proposed approach
_escape_trino._escape_prestoas a deprecated alias in a comment/docstring, to be removed in a future major release.No behavior change — naming/aliasing only.