Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ BUCKETS: 'BUCKETS';
BY: 'BY';
BYTE: 'BYTE';
CACHE: 'CACHE';
CACHED: 'CACHED';
CALL: 'CALL';
CALLED: 'CALLED';
CASCADE: 'CASCADE';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ statement
| SHOW PROCEDURES ((FROM | IN) identifierReference)? #showProcedures
| SHOW CREATE TABLE identifierReference (AS SERDE)? #showCreateTable
| SHOW CURRENT namespace #showCurrentNamespace
| SHOW CACHED TABLES #showCachedTables
| SHOW CATALOGS (LIKE? pattern=stringLit)? #showCatalogs
| (DESC | DESCRIBE) FUNCTION EXTENDED? describeFuncName #describeFunction
| (DESC | DESCRIBE) PROCEDURE identifierReference #describeProcedure
Expand Down
32 changes: 32 additions & 0 deletions sql/api/src/main/scala/org/apache/spark/sql/SparkSession.scala
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,38 @@ abstract class SparkSession extends Serializable with Closeable {
*/
def range(start: Long, end: Long, step: Long, numPartitions: Int): Dataset[lang.Long]

/**
* Parses a multipart identifier (e.g. table or namespace name) into parts.
* Used by the Catalog API when building SQL DDL strings.
*
* @since 4.2.0
*/
def parseMultipartIdentifier(identifier: String): Seq[String]

/**
* Quotes an identifier part for safe use in SQL strings (e.g. backtick-wrapped).
* Used by the Catalog API when building SQL DDL strings.
*
* @since 4.2.0
*/
def quoteIdentifier(identifier: String): String

/**
* Returns the current default database (namespace) in this session.
* Used by the Catalog API.
*
* @since 4.2.0
*/
def currentDatabase: String

/**
* Returns the current default catalog in this session.
* Used by the Catalog API.
*
* @since 4.2.0
*/
def currentCatalog(): String

/* ------------------------- *
| Catalog-related methods |
* ------------------------- */
Expand Down
Loading