This is an automated email from the ASF dual-hosted git repository.

srowen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new 04ad559  [SPARK-27016][SQL][BUILD] Treat all antlr warnings as errors 
while generating parser from the sql grammar file.
04ad559 is described below

commit 04ad559ab64df19ddfdf9e6fe0de3f8484daf86e
Author: Dilip Biswal <dbis...@us.ibm.com>
AuthorDate: Sun Mar 3 10:02:25 2019 -0600

    [SPARK-27016][SQL][BUILD] Treat all antlr warnings as errors while 
generating parser from the sql grammar file.
    
    ## What changes were proposed in this pull request?
    Use the maven plugin option `treatWarningsAsErrors` to make sure the 
warnings are treated as errors while generating the parser file. In the absence 
of it, we may inadvertently introducing problems while making grammar changes.  
Please refer to [PR-23897](https://github.com/apache/spark/pull/23897) to know 
more about the context.
    ## How was this patch tested?
    We can use two ways to build Spark 1) sbt 2) Maven
    This PR, we made a change to configure the maven antlr plugin to include a 
parameter that makes antlr4 report error on warning. However, when spark is 
built using sbt, we use the sbt antlr plugin which does not allow us to pass 
this additional compilation flag.  More info on sbt-antlr plugin can be found 
at 
[link](https://github.com/ihji/sbt-antlr4/blob/master/src/main/scala/com/simplytyped/Antlr4Plugin.scala)
    In summary, this fix only applicable when we use maven to build.
    
    Closes #23925 from dilipbiswal/antlr_fix.
    
    Authored-by: Dilip Biswal <dbis...@us.ibm.com>
    Signed-off-by: Sean Owen <sean.o...@databricks.com>
---
 sql/catalyst/pom.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sql/catalyst/pom.xml b/sql/catalyst/pom.xml
index 20cc5d0..15fc5e3 100644
--- a/sql/catalyst/pom.xml
+++ b/sql/catalyst/pom.xml
@@ -156,6 +156,7 @@
         <configuration>
           <visitor>true</visitor>
           <sourceDirectory>../catalyst/src/main/antlr4</sourceDirectory>
+          <treatWarningsAsErrors>true</treatWarningsAsErrors>
         </configuration>
       </plugin>
     </plugins>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to