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

diwu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-spark-connector.git


The following commit(s) were added to refs/heads/master by this push:
     new 9cbce93  [improve] update build script (#157)
9cbce93 is described below

commit 9cbce935b43a98a3ce608dc67c15aeb048bdb42d
Author: gnehil <adamlee...@gmail.com>
AuthorDate: Wed Nov 8 18:39:28 2023 +0800

    [improve] update build script (#157)
    
    Co-authored-by: gnehil <gnehil489@github>
---
 spark-doris-connector/build.sh | 34 ++++++++++++++++++++++++++--------
 1 file changed, 26 insertions(+), 8 deletions(-)

diff --git a/spark-doris-connector/build.sh b/spark-doris-connector/build.sh
index d62aee1..ab2f770 100755
--- a/spark-doris-connector/build.sh
+++ b/spark-doris-connector/build.sh
@@ -142,24 +142,30 @@ selectScala() {
 
 selectSpark() {
   echo 'Spark-Doris-Connector supports multiple versions of spark. Which 
version do you need ?'
-  select spark in "2.3.x" "3.1.x" "3.2.x" "3.3.x" "other"
+  select spark in "2.3.x" "2.4.x" "3.1.x" "3.2.x" "3.3.x" "3.4.x" "other"
   do
     case $spark in
       "2.3.x")
         return 1
         ;;
-      "3.1.x")
+      "2.4.x")
         return 2
         ;;
-      "3.2.x")
+      "3.1.x")
         return 3
         ;;
-      "3.3.x")
+      "3.2.x")
         return 4
         ;;
-      "other")
+      "3.3.x")
         return 5
         ;;
+      "3.4.x")
+        return 6
+        ;;
+      "other")
+        return 7
+        ;;
     esac
   done
 }
@@ -174,18 +180,30 @@ SparkVer=$?
 if [ ${SparkVer} -eq 1 ]; then
     SPARK_VERSION="2.3.4"
 elif [ ${SparkVer} -eq 2 ]; then
-    SPARK_VERSION="3.1.2"
+    SPARK_VERSION="2.4.8"
 elif [ ${SparkVer} -eq 3 ]; then
-    SPARK_VERSION="3.2.0"
+    SPARK_VERSION="3.1.3"
 elif [ ${SparkVer} -eq 4 ]; then
-    SPARK_VERSION="3.3.2"
+    SPARK_VERSION="3.2.4"
 elif [ ${SparkVer} -eq 5 ]; then
+    SPARK_VERSION="3.3.3"
+elif [ ${SparkVer} -eq 6 ]; then
+    SPARK_VERSION="3.4.1"
+elif [ ${SparkVer} -eq 7 ]; then
     # shellcheck disable=SC2162
     read -p 'Which spark version do you need? please input
     :' ver
     SPARK_VERSION=$ver
 fi
 
+if [[ $SPARK_VERSION =~ ^2.3 && $SCALA_VERSION == "2.12"  ]]; then
+  echo_r "Spark 2.3 is not compatible with scala 2.12, will exit."
+  exit 1
+elif [[ $SPARK_VERSION =~ ^3.* && $SCALA_VERSION == "2.11" ]]; then
+  echo_r "Spark 3.x is not compatible with scala 2.11, will exit."
+  exit 1
+fi
+
 # extract major version:
 # eg: 3.1.2 -> 3.1
 SPARK_MAJOR_VERSION=0


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

Reply via email to