You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by gu...@apache.org on 2020/01/22 00:45:55 UTC

[spark] branch branch-2.4 updated: Revert "[SPARK-30534][INFRA] Use mvn in `dev/scalastyle`"

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

gurwls223 pushed a commit to branch branch-2.4
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-2.4 by this push:
     new 90dea83  Revert "[SPARK-30534][INFRA] Use mvn in `dev/scalastyle`"
90dea83 is described below

commit 90dea8314fe8bcede1d52e4aa3ce34bd323ab789
Author: HyukjinKwon <gu...@apache.org>
AuthorDate: Wed Jan 22 09:45:05 2020 +0900

    Revert "[SPARK-30534][INFRA] Use mvn in `dev/scalastyle`"
    
    This reverts commit ac541568d69388a3fd6467e8792900840573a590.
---
 dev/scalastyle                                        | 19 +++++++++++++++----
 .../spark/sql/jdbc/OracleIntegrationSuite.scala       |  2 +-
 pom.xml                                               |  2 +-
 3 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/dev/scalastyle b/dev/scalastyle
index b54027f..b8053df 100755
--- a/dev/scalastyle
+++ b/dev/scalastyle
@@ -17,10 +17,21 @@
 # limitations under the License.
 #
 
-SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
-
-SPARK_PROFILES=${1:-"-Pmesos -Pkubernetes -Pyarn -Pspark-ganglia-lgpl -Pkinesis-asl -Phive-thriftserver -Phive -Pkafka-0-8 -Pflume -Pdocker-integration-tests -Pkubernetes-integration-tests"}
-ERRORS=$($SCRIPT_DIR/../build/mvn $SPARK_PROFILES scalastyle:check | grep "^error file")
+# NOTE: echo "q" is needed because SBT prompts the user for input on encountering a build file
+# with failure (either resolution or compilation); the "q" makes SBT quit.
+ERRORS=$(echo -e "q\n" \
+    | build/sbt \
+        -Pkinesis-asl \
+        -Pmesos \
+        -Pkafka-0-8 \
+        -Pkubernetes \
+        -Pyarn \
+        -Pflume \
+        -Phive \
+        -Phive-thriftserver \
+        scalastyle test:scalastyle \
+    | awk '{if($1~/error/)print}' \
+)
 
 if test ! -z "$ERRORS"; then
     echo -e "Scalastyle checks failed at following occurrences:\n$ERRORS"
diff --git a/external/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/OracleIntegrationSuite.scala b/external/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/OracleIntegrationSuite.scala
index 85d4bbf..540de0f 100644
--- a/external/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/OracleIntegrationSuite.scala
+++ b/external/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/OracleIntegrationSuite.scala
@@ -154,7 +154,7 @@ class OracleIntegrationSuite extends DockerJDBCIntegrationSuite with SharedSQLCo
     // A value with fractions from DECIMAL(3, 2) is correct:
     assert(row.getDecimal(1).compareTo(BigDecimal.valueOf(1.23)) == 0)
     // A value > Int.MaxValue from DECIMAL(10) is correct:
-    assert(row.getDecimal(2).compareTo(BigDecimal.valueOf(9999999999L)) == 0)
+    assert(row.getDecimal(2).compareTo(BigDecimal.valueOf(9999999999l)) == 0)
   }
 
 
diff --git a/pom.xml b/pom.xml
index f518386..c792671 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2558,7 +2558,7 @@
         <configuration>
           <verbose>false</verbose>
           <failOnViolation>true</failOnViolation>
-          <includeTestSourceDirectory>true</includeTestSourceDirectory>
+          <includeTestSourceDirectory>false</includeTestSourceDirectory>
           <failOnWarning>false</failOnWarning>
           <sourceDirectory>${basedir}/src/main/scala</sourceDirectory>
           <testSourceDirectory>${basedir}/src/test/scala</testSourceDirectory>


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