public interface QueryErrorsBase
QueryErrorsBase
shall follow the rules:
1. Any values shall be outputted in the SQL standard style by using toSQLValue()
.
For example: 'a string value', 1, NULL.
2. SQL types shall be double quoted and outputted in the upper case using toSQLType()
.
For example: "INT", "DECIMAL(10,0)".
3. Elements of identifiers shall be wrapped by backticks by using toSQLId()
.
For example: namespaceA
.funcB
, tableC
.
4. SQL statements shall be in the upper case prepared by using toSQLStmt
.
For example: DESC PARTITION, DROP TEMPORARY FUNCTION.
5. SQL configs and datasource options shall be wrapped by double quotes by using
toSQLConf()
/toDSOption()
.
For example: "spark.sql.ansi.enabled".
6. Any values of datasource options or SQL configs shall be double quoted.
For example: "true", "CORRECTED".
7. SQL expressions shall be wrapped by double quotes.
For example: "earnings + 1".Modifier and Type | Method and Description |
---|---|
QueryContext[] |
getQueryContext(org.apache.spark.sql.catalyst.trees.SQLQueryContext sqlContext) |
String |
getSummary(org.apache.spark.sql.catalyst.trees.SQLQueryContext sqlContext) |
String |
quoteByDefault(String elem) |
String |
toDSOption(String option) |
String |
toSQLConf(String conf) |
String |
toSQLConfVal(String conf) |
String |
toSQLExpr(org.apache.spark.sql.catalyst.expressions.Expression e) |
String |
toSQLId(scala.collection.Seq<String> parts) |
String |
toSQLId(String parts) |
String |
toSQLSchema(String schema) |
String |
toSQLStmt(String text) |
String |
toSQLType(org.apache.spark.sql.types.AbstractDataType t) |
String |
toSQLValue(Object v,
DataType t) |
QueryContext[] getQueryContext(org.apache.spark.sql.catalyst.trees.SQLQueryContext sqlContext)
String getSummary(org.apache.spark.sql.catalyst.trees.SQLQueryContext sqlContext)
String quoteByDefault(String elem)
String toDSOption(String option)
String toSQLConf(String conf)
String toSQLConfVal(String conf)
String toSQLExpr(org.apache.spark.sql.catalyst.expressions.Expression e)
String toSQLId(scala.collection.Seq<String> parts)
String toSQLId(String parts)
String toSQLSchema(String schema)
String toSQLStmt(String text)
String toSQLType(org.apache.spark.sql.types.AbstractDataType t)
String toSQLValue(Object v, DataType t)