HyukjinKwon commented on a change in pull request #27039: [SPARK-29174][SQL]
Support LOCAL in INSERT OVERWRITE DIRECTORY to data source
URL: https://github.com/apache/spark/pull/27039#discussion_r367759204
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/SparkSqlParser.scala
##########
@@ -809,7 +805,12 @@ class SparkSqlAstBuilder(conf: SQLConf) extends
AstBuilder(conf) {
}
if (!path.isEmpty) {
- val customLocation = Some(CatalogUtils.stringToURI(path))
+ val customLocation = if (ctx.LOCAL() != null) {
+ // force scheme to be file rather than fs.default.name
Review comment:
@ajithme, Can you double check how Hive works if other scheme are given? The
current code seems always forcing to local scheme, e.g., `hdfs:/a/b/c` will
becomes `file:/a/b/c`. Does Hive works in this way too?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]