[ https://issues.apache.org/jira/browse/SPARK-21102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16054591#comment-16054591 ]
Anton Okolnychyi commented on SPARK-21102: ------------------------------------------ Hi [~rxin], I took a look at this issue and have a prototype that fixes this. It is available [here| https://github.com/aokolnychyi/spark/commit/fc2b7c02fab7f570ae3ca080ae1c2c9502300de7]. I am not sure that my current implementation is the most optimal, so any feedback is appreciated. My first idea was to make the grammar as strict as possible. Unfortunately, there were some problems. I tried the approach below: SqlBase.g4 {noformat} ... | REFRESH TABLE tableIdentifier #refreshTable | REFRESH resourcePath #refreshResource ... resourcePath : STRING | (IDENTIFIER | number | nonReserved | '/' | '-')+ // other symbols can be added if needed ; {noformat} It is not flexible enough and requires to explicitly mention all possible symbols. Therefore, I came up with the approach that was mentioned at the beginning. Let me know your opinion on which one is better. > Refresh command is too aggressive in parsing > -------------------------------------------- > > Key: SPARK-21102 > URL: https://issues.apache.org/jira/browse/SPARK-21102 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 2.2.0 > Reporter: Reynold Xin > Labels: starter > > SQL REFRESH command parsing is way too aggressive: > {code} > | REFRESH TABLE tableIdentifier > #refreshTable > | REFRESH .*? > #refreshResource > {code} > We should change it so it takes the whole string (without space), or a quoted > string. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org