Class SqlUtil


  • public class SqlUtil
    extends Object
    • Constructor Detail

      • SqlUtil

        public SqlUtil()
    • Method Detail

      • getKuduDataType

        public static org.apache.kudu.Type getKuduDataType​(SqlDataTypeNode dataType)
        Translates JDBC sql types to Kudu data types
        Parameters:
        dataType - the datatype from Calcite
        Returns:
        Kudu type that represents this Calcite type
      • translateDefaultValue

        public static Object translateDefaultValue​(org.apache.kudu.Type kuduType,
                                                   Object defaultValue)
        Translates the default object value type to the data type that is expected by Kudu
        Parameters:
        kuduType - Kudu type in the table
        defaultValue - default value taken from Schema
        Returns:
        Translated defaultValue into java type Calcite expects