Github user hvanhovell commented on a diff in the pull request:
https://github.com/apache/spark/pull/10571#discussion_r48846992
--- Diff: project/SparkBuild.scala ---
@@ -443,6 +443,7 @@ object Hive {
val relGFilePath = (gFilePath relativeTo sourceDir).get.getPath
log.info("ANTLR: Grammar file '%s' detected.".format(relGFilePath))
antlr.addGrammarFile(relGFilePath)
+ antlr.setLibDirectory(gFilePath.getParent)
--- End diff --
Brittle solution would be:
val grammarDir = sourceDir / "org" / "apache" / "spark" / "sql" /
"catalyst" / "parser"
antlr.setLibDirectory(grammarDir.getPath)
grammarFileNames.foreach { gFileName =>
// We construct the entire path in order to make sure the file
exists.
val relGFilePath = ((grammarDir / gFileName) relativeTo
sourceDir).get.getPath
log.info("ANTLR: Grammar file '%s' detected.".format(relGFilePath))
antlr.addGrammarFile(relGFilePath)
}
---
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]