Package io.trino.plugin.hive
Class HiveToTrinoTranslator
- java.lang.Object
-
- io.trino.plugin.hive.HiveToTrinoTranslator
-
public final class HiveToTrinoTranslator extends Object
Translate statements in Hive QL to Trino SQL.Only translation of quoted literals is currently included.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringtranslateHiveViewToTrino(String hiveStatement)Translate a HiveQL statement to Trino SQL by fixing quoted identifiers and string literals.
-
-
-
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.
-
-