Github user gatorsmile commented on a diff in the pull request: https://github.com/apache/spark/pull/14823#discussion_r77098633 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/SparkSqlParser.scala --- @@ -325,14 +325,17 @@ class SparkSqlAstBuilder(conf: SQLConf) extends AstBuilder { .getOrElse(Array.empty[String]) val bucketSpec = Option(ctx.bucketSpec()).map(visitBucketSpec) + // TODO: this may be wrong for non file-based data source like JDBC, which should be external + // even there is no `path` in options. We should consider allow the EXTERNAL keyword. + val tableType = if (new CaseInsensitiveMap(options).contains("path")) { + CatalogTableType.EXTERNAL --- End diff -- We can remove https://github.com/cloud-fan/spark/blob/0e9b3d2a81f0251f710eae42adca307cd9c69d33/sql/core/src/main/scala/org/apache/spark/sql/execution/SparkSqlParser.scala#L316-L318 ? After this PR, it becomes much clear to users. We can support `Create External Data Source Table`! We just need to confirm the `path` is provided.
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org