Skip to content

Commit

Permalink
Exclude .g4 files under spark from repository
Browse files Browse the repository at this point in the history
Signed-off-by: Tomoyuki Morita <[email protected]>
  • Loading branch information
ykmr1224 committed May 16, 2024
1 parent 1985459 commit a3eb553
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 2,969 deletions.
3 changes: 3 additions & 0 deletions spark/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ tasks.register('downloadG4Files', Exec) {
args '-o', 'src/main/antlr/SqlBaseParser.g4', 'https://raw.githubusercontent.com/apache/spark/master/sql/api/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBaseParser.g4'
args '-o', 'src/main/antlr/SqlBaseLexer.g4', 'https://raw.githubusercontent.com/apache/spark/master/sql/api/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBaseLexer.g4'
}
clean.delete fileTree('src/main/antlr/') { include '*.g4' }

generateGrammarSource {
arguments += ['-visitor', '-package', 'org.opensearch.sql.spark.antlr.parser']
Expand All @@ -39,6 +40,8 @@ configurations {
// Make sure the downloadG4File task runs before the generateGrammarSource task
generateGrammarSource.dependsOn downloadG4Files

compileJava.dependsOn generateGrammarSource

dependencies {
antlr "org.antlr:antlr4:4.7.1"

Expand Down
2 changes: 2 additions & 0 deletions spark/src/main/antlr/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# .g4 files are downloaded from other repositories during build
*.g4
205 changes: 0 additions & 205 deletions spark/src/main/antlr/FlintSparkSqlExtensions.g4

This file was deleted.

Loading

0 comments on commit a3eb553

Please sign in to comment.