Github user hvanhovell commented on a diff in the pull request:
https://github.com/apache/spark/pull/12271#discussion_r59132631
--- Diff:
sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/HiveSqlParser.scala
---
@@ -397,11 +429,28 @@ class HiveSqlAstBuilder extends SparkSqlAstBuilder {
}
/**
- * Storage Handlers are currently not supported in the statements we
support (CTAS).
+ * Create a [[RowFormat]] used for creating tables.
+ *
+ * Example format:
+ * {{{
+ * SERDE serde_name [WITH SERDEPROPERTIES (k1=v1, k2=v2, ...)]
+ * }}}
+ *
+ * OR
+ *
+ * {{{
+ * DELIMITED [FIELDS TERMINATED BY char [ESCAPED BY char]]
+ * [COLLECTION ITEMS TERMINATED BY char]
+ * [MAP KEYS TERMINATED BY char]
+ * [LINES TERMINATED BY char]
+ * [NULL DEFINED AS char]
+ * }}}
*/
- override def visitStorageHandler(
- ctx: StorageHandlerContext): CatalogStorageFormat = withOrigin(ctx) {
- throw new ParseException("Storage Handlers are currently
unsupported.", ctx)
+ private def visitRowFormat(ctx: RowFormatContext): CatalogStorageFormat
= withOrigin(ctx) {
+ ctx match {
--- End diff --
Minor: You could also call `ctx.accept(this)` here and cast it, but I get
that this is more typed and less opaque.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]