Package org.apache.spark.sql.jdbc
Class NoopDialect
Object
org.apache.spark.sql.jdbc.NoopDialect
NOOP dialect object, always returning the neutral element.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String[]
alterTable
(String tableName, scala.collection.immutable.Seq<TableChange> changes, int dbMajorVersion) static void
beforeFetch
(Connection connection, scala.collection.immutable.Map<String, String> properties) static boolean
static AnalysisException
classifyException
(String message, Throwable e) static AnalysisException
classifyException
(Throwable e, String errorClass, scala.collection.immutable.Map<String, String> messageParameters, String description) static scala.Option<String>
compileAggregate
(AggregateFunc aggFunction) static scala.Option<String>
compileExpression
(Expression expr) static Object
compileValue
(Object value) static Date
static Timestamp
static LocalDateTime
static Timestamp
static scala.Function1<Object,
Connection> createConnectionFactory
(org.apache.spark.sql.execution.datasources.jdbc.JDBCOptions options) static String
createIndex
(String indexName, Identifier tableIdent, NamedReference[] columns, Map<NamedReference, Map<String, String>> columnsProperties, Map<String, String> properties) static void
createSchema
(Statement statement, String schema, String comment) static void
createTable
(Statement statement, String tableName, String strSchema, org.apache.spark.sql.execution.datasources.jdbc.JdbcOptionsInWrite options) static String
dropIndex
(String indexName, Identifier tableIdent) static String
dropSchema
(String schema, boolean cascade) static String
static scala.collection.immutable.Seq<scala.Tuple2<String,
UnboundFunction>> static String
getAddColumnQuery
(String tableName, String columnName, String dataType) static scala.Option<DataType>
getCatalystType
(int sqlType, String typeName, int size, MetadataBuilder md) static long
getDayTimeIntervalAsMicros
(String daytimeStr) static String
getDeleteColumnQuery
(String tableName, String columnName) static String
static JdbcSQLQueryBuilder
getJdbcSQLQueryBuilder
(org.apache.spark.sql.execution.datasources.jdbc.JDBCOptions options) static scala.Option<JdbcType>
getJDBCType
(DataType dt) static String
getLimitClause
(Integer limit) static String
getOffsetClause
(Integer offset) static String
getRenameColumnQuery
(String tableName, String columnName, String newName, int dbMajorVersion) static String
getSchemaCommentQuery
(String schema, String comment) static String
getSchemaQuery
(String table) static String
getTableCommentQuery
(String table, String comment) static String
getTableExistsQuery
(String table) static String
getTableSample
(org.apache.spark.sql.execution.datasources.v2.TableSampleInfo sample) static String
getTruncateQuery
(String table) static String
getTruncateQuery
(String table, scala.Option<Object> cascade) static scala.Option<Object>
static String
getUpdateColumnNullabilityQuery
(String tableName, String columnName, boolean isNullable) static String
getUpdateColumnTypeQuery
(String tableName, String columnName, String newDataType) static int
getYearMonthIntervalAsMonths
(String yearmonthStr) static boolean
indexExists
(Connection conn, String indexName, Identifier tableIdent, org.apache.spark.sql.execution.datasources.jdbc.JDBCOptions options) static String
insertIntoTable
(String table, StructField[] fields) static scala.Option<Object>
static boolean
isSupportedFunction
(String funcName) static TableIndex[]
listIndexes
(Connection conn, Identifier tableIdent, org.apache.spark.sql.execution.datasources.jdbc.JDBCOptions options) static String[][]
listSchemas
(Connection conn, org.apache.spark.sql.execution.datasources.jdbc.JDBCOptions options) static org.apache.spark.internal.Logging.LogStringContext
LogStringContext
(scala.StringContext sc) static org.slf4j.Logger
static void
org$apache$spark$internal$Logging$$log__$eq
(org.slf4j.Logger x$1) static String
quoteIdentifier
(String colName) static String
removeSchemaCommentQuery
(String schema) static String
renameTable
(String oldTable, String newTable) static String
renameTable
(Identifier oldTable, Identifier newTable) static boolean
schemasExists
(Connection conn, org.apache.spark.sql.execution.datasources.jdbc.JDBCOptions options, String schema) static boolean
static boolean
static boolean
static void
updateExtraColumnMeta
(Connection conn, ResultSetMetaData rsmd, int columnIdx, MetadataBuilder metadata)
-
Constructor Details
-
NoopDialect
public NoopDialect()
-
-
Method Details
-
canHandle
-
LogStringContext
public static org.apache.spark.internal.Logging.LogStringContext LogStringContext(scala.StringContext sc) -
getCatalystType
public static scala.Option<DataType> getCatalystType(int sqlType, String typeName, int size, MetadataBuilder md) -
getJDBCType
-
convertJavaTimestampToTimestamp
-
convertJavaDateToDate
-
getYearMonthIntervalAsMonths
-
getDayTimeIntervalAsMicros
-
convertJavaTimestampToTimestampNTZ
-
convertTimestampNTZToJavaTimestamp
-
createConnectionFactory
public static scala.Function1<Object,Connection> createConnectionFactory(org.apache.spark.sql.execution.datasources.jdbc.JDBCOptions options) -
quoteIdentifier
-
createTable
-
insertIntoTable
-
getTableExistsQuery
-
getSchemaQuery
-
getTruncateQuery
-
getTruncateQuery
-
getTruncateQuery$default$2
-
beforeFetch
public static void beforeFetch(Connection connection, scala.collection.immutable.Map<String, String> properties) -
compileValue
-
isSupportedFunction
-
compileExpression
-
compileAggregate
-
functions
-
createSchema
-
schemasExists
public static boolean schemasExists(Connection conn, org.apache.spark.sql.execution.datasources.jdbc.JDBCOptions options, String schema) -
listSchemas
public static String[][] listSchemas(Connection conn, org.apache.spark.sql.execution.datasources.jdbc.JDBCOptions options) -
isCascadingTruncateTable
-
renameTable
-
renameTable
-
alterTable
public static String[] alterTable(String tableName, scala.collection.immutable.Seq<TableChange> changes, int dbMajorVersion) -
getAddColumnQuery
-
getRenameColumnQuery
-
getDeleteColumnQuery
-
getUpdateColumnTypeQuery
-
getUpdateColumnNullabilityQuery
-
getTableCommentQuery
-
getSchemaCommentQuery
-
removeSchemaCommentQuery
-
dropSchema
-
dropTable
-
createIndex
public static String createIndex(String indexName, Identifier tableIdent, NamedReference[] columns, Map<NamedReference, Map<String, String>> columnsProperties, Map<String, String> properties) -
indexExists
public static boolean indexExists(Connection conn, String indexName, Identifier tableIdent, org.apache.spark.sql.execution.datasources.jdbc.JDBCOptions options) -
dropIndex
-
listIndexes
public static TableIndex[] listIndexes(Connection conn, Identifier tableIdent, org.apache.spark.sql.execution.datasources.jdbc.JDBCOptions options) -
classifyException
-
classifyException
-
getLimitClause
-
getOffsetClause
-
getJdbcSQLQueryBuilder
public static JdbcSQLQueryBuilder getJdbcSQLQueryBuilder(org.apache.spark.sql.execution.datasources.jdbc.JDBCOptions options) -
supportsLimit
public static boolean supportsLimit() -
supportsOffset
public static boolean supportsOffset() -
supportsTableSample
public static boolean supportsTableSample() -
getTableSample
public static String getTableSample(org.apache.spark.sql.execution.datasources.v2.TableSampleInfo sample) -
getFullyQualifiedQuotedTableName
-
updateExtraColumnMeta
public static void updateExtraColumnMeta(Connection conn, ResultSetMetaData rsmd, int columnIdx, MetadataBuilder metadata) -
org$apache$spark$internal$Logging$$log_
public static org.slf4j.Logger org$apache$spark$internal$Logging$$log_() -
org$apache$spark$internal$Logging$$log__$eq
public static void org$apache$spark$internal$Logging$$log__$eq(org.slf4j.Logger x$1)
-