aboutsummaryrefslogtreecommitdiff
path: root/project
diff options
context:
space:
mode:
authorLiang-Chi Hsieh <viirya@gmail.com>2016-01-05 10:21:47 -0800
committerReynold Xin <rxin@databricks.com>2016-01-05 10:21:47 -0800
commit9a6ba7e2c538124f539b50512a7f95059f81cc16 (patch)
treead9cc75abd3d5c87f59fccf188b684e0777ffab0 /project
parentb3c48e39f4a0a42a0b6b433511b2cce0d1e3f03d (diff)
downloadspark-9a6ba7e2c538124f539b50512a7f95059f81cc16.tar.gz
spark-9a6ba7e2c538124f539b50512a7f95059f81cc16.tar.bz2
spark-9a6ba7e2c538124f539b50512a7f95059f81cc16.zip
[SPARK-12643][BUILD] Set lib directory for antlr
JIRA: https://issues.apache.org/jira/browse/SPARK-12643 Without setting lib directory for antlr, the updates of imported grammar files can not be detected. So SparkSqlParser.g will not be rebuilt automatically. Since it is a minor update, no JIRA ticket is opened. Let me know if it is needed. Thanks. Author: Liang-Chi Hsieh <viirya@gmail.com> Closes #10571 from viirya/antlr-build.
Diffstat (limited to 'project')
-rw-r--r--project/SparkBuild.scala4
1 files changed, 4 insertions, 0 deletions
diff --git a/project/SparkBuild.scala b/project/SparkBuild.scala
index 588e97f64e..af1d36c6ea 100644
--- a/project/SparkBuild.scala
+++ b/project/SparkBuild.scala
@@ -443,6 +443,10 @@ object Hive {
val relGFilePath = (gFilePath relativeTo sourceDir).get.getPath
log.info("ANTLR: Grammar file '%s' detected.".format(relGFilePath))
antlr.addGrammarFile(relGFilePath)
+ // We will set library directory multiple times here. However, only the
+ // last one has effect. Because the grammar files are located under the same directory,
+ // We assume there is only one library directory.
+ antlr.setLibDirectory(gFilePath.getParent)
}
// Generate the parser.