Class HiveToTrinoTranslator


  • public final class HiveToTrinoTranslator
    extends Object
    Translate statements in Hive QL to Trino SQL.

    Only translation of quoted literals is currently included.

    • Method Detail

      • translateHiveViewToTrino

        public static String translateHiveViewToTrino​(String hiveStatement)
        Translate a HiveQL statement to Trino SQL by fixing quoted identifiers and string literals. No other translation is performed.

        Backquotes are replaced with double quotes, including SQL-style escapes (`` becomes ` and " becomes "").

        Single and double quotes are replaced with single quotes, with minimal processing of escape sequences to ensure that the strings end in the right place.