Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18368#discussion_r124299127
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/SparkSqlParser.scala ---
    @@ -230,11 +230,24 @@ class SparkSqlAstBuilder(conf: SQLConf) extends 
AstBuilder(conf) {
       }
     
       /**
    -   * Create a [[RefreshTable]] logical plan.
    +   * Create a [[RefreshResource]] logical plan.
        */
       override def visitRefreshResource(ctx: RefreshResourceContext): 
LogicalPlan = withOrigin(ctx) {
    -    val resourcePath = remainder(ctx.REFRESH.getSymbol).trim
    -    RefreshResource(resourcePath)
    +    val path = if (ctx.STRING != null) string(ctx.STRING) else 
extractUnquotedResourcePath(ctx)
    +    RefreshResource(path)
    +  }
    +
    +  private def extractUnquotedResourcePath(ctx: RefreshResourceContext): 
String = withOrigin(ctx) {
    +    val unquotedPath = remainder(ctx.REFRESH.getSymbol).trim
    +    validate(
    +      unquotedPath != null && !unquotedPath.isEmpty,
    +      "Resource paths cannot be empty in REFRESH statements. Use / to 
match everything",
    +      ctx)
    +    validate(
    +      !unquotedPath.contains(' '),
    --- End diff --
    
    How about the other space `\r\n\t`?


---
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]

Reply via email to