Package com.twilio.kudu.sql
Class SqlUtil
- java.lang.Object
-
- com.twilio.kudu.sql.SqlUtil
-
public class SqlUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description SqlUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getExplainPlan(ResultSet rs)
static org.apache.kudu.Type
getKuduDataType(SqlDataTypeNode dataType)
Translates JDBC sql types to Kudu data typesstatic Object
translateDefaultValue(org.apache.kudu.Type kuduType, Object defaultValue)
Translates the default object value type to the data type that is expected by Kudu
-
-
-
Method Detail
-
getExplainPlan
public static String getExplainPlan(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 tabledefaultValue
- default value taken fromSchema
- Returns:
- Translated defaultValue into java type Calcite expects
-
-