Class SqlUtil

java.lang.Object
com.twilio.kudu.sql.SqlUtil

public class SqlUtil extends Object
  • Constructor Details

    • SqlUtil

      public SqlUtil()
  • Method Details

    • getExplainPlan

      public static String getExplainPlan(ResultSet rs) throws SQLException
      Throws:
      SQLException
    • getResult

      public static List<List<Object>> getResult(ResultSet rs) throws SQLException
      Throws:
      SQLException
    • 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