seancxmao opened a new pull request #23713: [SPARK-26799] Make ANTLR v4 version 
consistent between Maven and SBT
URL: https://github.com/apache/spark/pull/23713
 
 
   ## What changes were proposed in this pull request?
   Currently ANTLR v4 versions used by Maven and SBT are slightly different. 
Maven uses `4.7.1` while SBT uses `4.7`. 
   
   * Maven(`pom.xml`): `<antlr4.version>4.7.1</antlr4.version>`
   * SBT(`project/SparkBuild.scala`): `antlr4Version in Antlr4 := "4.7"`
   
   We should make Maven and SBT use a single version. Furthermore we'd better 
specify antlr4 version in one place to avoid mismatch between Maven and SBT in 
the future.
   
   This PR lets SBT use antlr4 version specified in Maven POM file, rather than 
specify its own antlr4 version. This is in the same as how `hadoop.version` is 
specified in `project/SparkBuild.scala`
   
   
   ## How was this patch tested?
   Test locally.
   
   After run `sbt compile`, Java files generated by ANTLR are located at:
   
   ```
   
sql/catalyst/target/scala-2.12/src_managed/main/antlr4/org/apache/spark/sql/catalyst/parser/*.java
   ```
   
   These Java files have a comment at the head. We can see now SBT uses ANTLR 
`4.7.1`.
   
   ```
   // Generated from 
.../spark/sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4
 by ANTLR 4.7.1
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to