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

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


The following commit(s) were added to refs/heads/master by this push:
     new 57de4a38a3 fix testcase error (#4337)
57de4a38a3 is described below

commit 57de4a38a3d9266604af662b88de7f356cf0d50d
Author: david <[email protected]>
AuthorDate: Tue Nov 7 05:28:38 2023 +0800

    fix testcase error (#4337)
    
    Co-authored-by: QiangCai <[email protected]>
---
 examples/spark/pom.xml                                       |  6 +++---
 index/secondary-index/pom.xml                                |  6 +++---
 integration/flink/pom.xml                                    |  6 +++---
 .../test/java/org/apache/carbondata/hive/HiveCarbonTest.java |  4 +++-
 integration/spark/pom.xml                                    |  6 +++---
 .../datacompaction/MajorCompactionStopsAfterCompaction.scala |  2 +-
 .../spark/testsuite/dataload/TestLoadDataFrame.scala         |  2 +-
 .../testsuite/iud/TestInsertAndOtherCommandConcurrent.scala  | 10 +++++-----
 .../org/apache/carbondata/view/rewrite/Tpcds_1_4_Suite.scala |  3 ++-
 mv/plan/pom.xml                                              |  6 +++---
 pom.xml                                                      | 12 ++++++------
 streaming/pom.xml                                            |  6 +++---
 12 files changed, 36 insertions(+), 33 deletions(-)

diff --git a/examples/spark/pom.xml b/examples/spark/pom.xml
index 64f0d9f20c..f73c9aa8a2 100644
--- a/examples/spark/pom.xml
+++ b/examples/spark/pom.xml
@@ -200,15 +200,15 @@
     </profile>
     <profile>
       <id>spark-2.3</id>
-      <activation>
-        <activeByDefault>true</activeByDefault>
-      </activation>
       <properties>
         <spark.binary.version>2.3</spark.binary.version>
       </properties>
     </profile>
     <profile>
       <id>spark-2.4</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
       <properties>
         <spark.binary.version>2.4</spark.binary.version>
       </properties>
diff --git a/index/secondary-index/pom.xml b/index/secondary-index/pom.xml
index b1a2414ffc..bdd7508254 100644
--- a/index/secondary-index/pom.xml
+++ b/index/secondary-index/pom.xml
@@ -158,15 +158,15 @@
     </profile>
     <profile>
       <id>spark-2.3</id>
-      <activation>
-        <activeByDefault>true</activeByDefault>
-      </activation>
       <properties>
         <spark.binary.version>2.3</spark.binary.version>
       </properties>
     </profile>
     <profile>
       <id>spark-2.4</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
       <properties>
         <spark.binary.version>2.4</spark.binary.version>
       </properties>
diff --git a/integration/flink/pom.xml b/integration/flink/pom.xml
index 5eca6fbbdc..05e0e0ec4c 100644
--- a/integration/flink/pom.xml
+++ b/integration/flink/pom.xml
@@ -220,9 +220,6 @@
     <profiles>
         <profile>
             <id>spark-2.3</id>
-            <activation>
-                <activeByDefault>true</activeByDefault>
-            </activation>
             <properties>
                 <spark.binary.version>2.3</spark.binary.version>
             </properties>
@@ -243,6 +240,9 @@
         </profile>
         <profile>
             <id>spark-2.4</id>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
             <properties>
                 <spark.binary.version>2.4</spark.binary.version>
             </properties>
diff --git 
a/integration/hive/src/test/java/org/apache/carbondata/hive/HiveCarbonTest.java 
b/integration/hive/src/test/java/org/apache/carbondata/hive/HiveCarbonTest.java
index 0188c64a3e..ccec18eb6a 100644
--- 
a/integration/hive/src/test/java/org/apache/carbondata/hive/HiveCarbonTest.java
+++ 
b/integration/hive/src/test/java/org/apache/carbondata/hive/HiveCarbonTest.java
@@ -171,9 +171,11 @@ public class HiveCarbonTest extends HiveTestUtils {
 
   @Test
   public void arrayOfTimestamp() throws Exception {
+    File rootPath = new File(HiveTestUtils.class.getResource("/").getPath() + 
"../../../..");
+    String tablePath = rootPath.getAbsolutePath() + 
"/integration/hive/target/hivee";
     statement.execute("drop table if exists hivee");
     statement.execute("CREATE external TABLE hivee(arrayInt ARRAY<timestamp>)"
-        + " ROW FORMAT SERDE 
'org.apache.hadoop.hive.contrib.serde2.MultiDelimitSerDe' WITH SERDEPROPERTIES 
('field.delim'=',', 'collection.delim'='$', 'mapkey.delim'='@') location '%s' 
TBLPROPERTIES('external.table.purge'='false')");
+        + " ROW FORMAT SERDE 
'org.apache.hadoop.hive.contrib.serde2.MultiDelimitSerDe' WITH SERDEPROPERTIES 
('field.delim'=',', 'collection.delim'='$', 'mapkey.delim'='@') location '"+ 
tablePath +"' TBLPROPERTIES('external.table.purge'='false')");
     statement.execute("insert into table hivee values 
(array(Timestamp('2000-03-12 15:00:00'),Timestamp('2001-04-15 
15:58:00'),Timestamp('2002-05-27 15:20:00')))");
     statement.execute("drop table if exists carbonn");
     statement.execute(
diff --git a/integration/spark/pom.xml b/integration/spark/pom.xml
index 6d278fcec1..8578dd2598 100644
--- a/integration/spark/pom.xml
+++ b/integration/spark/pom.xml
@@ -608,9 +608,6 @@
     </profile>
     <profile>
       <id>spark-2.3</id>
-      <activation>
-        <activeByDefault>true</activeByDefault>
-      </activation>
       <properties>
         <spark.binary.version>2.3</spark.binary.version>
       </properties>
@@ -652,6 +649,9 @@
     </profile>
     <profile>
       <id>spark-2.4</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
       <properties>
         <spark.binary.version>2.4</spark.binary.version>
       </properties>
diff --git 
a/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/MajorCompactionStopsAfterCompaction.scala
 
b/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/MajorCompactionStopsAfterCompaction.scala
index daad76512a..c0578da617 100644
--- 
a/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/MajorCompactionStopsAfterCompaction.scala
+++ 
b/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/datacompaction/MajorCompactionStopsAfterCompaction.scala
@@ -93,7 +93,7 @@ class MajorCompactionStopsAfterCompaction extends QueryTest 
with BeforeAndAfterA
       if (!segments.contains(requiredSeg)) {
         // wait for 2 seconds for compaction to complete.
         // scalastyle:off println
-        System.out.println("sleping for 2 seconds.")
+        System.out.println("sleeping for 2 seconds.")
         // scalastyle:on println
         Thread.sleep(2000)
         noOfRetries += 1
diff --git 
a/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/dataload/TestLoadDataFrame.scala
 
b/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/dataload/TestLoadDataFrame.scala
index c7b9a9a407..9acc2c3415 100644
--- 
a/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/dataload/TestLoadDataFrame.scala
+++ 
b/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/dataload/TestLoadDataFrame.scala
@@ -168,7 +168,7 @@ class TestLoadDataFrame extends QueryTest with 
BeforeAndAfterAll {
   }
 
   test("test datasource table with specified table path") {
-    val path = "./source"
+    val path = s"$target/source"
     df2.write
       .format("carbondata")
       .option("tableName", "carbon10")
diff --git 
a/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/iud/TestInsertAndOtherCommandConcurrent.scala
 
b/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/iud/TestInsertAndOtherCommandConcurrent.scala
index 37b7f52f0c..53f9692794 100644
--- 
a/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/iud/TestInsertAndOtherCommandConcurrent.scala
+++ 
b/integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/iud/TestInsertAndOtherCommandConcurrent.scala
@@ -66,7 +66,7 @@ class TestInsertAndOtherCommandConcurrent
       .option("tableName", "temp_table")
       .option("tempCSV", "false")
       .mode(SaveMode.Overwrite)
-      .save()
+      .saveAsTable("temp_table")
 
     sql(s"insert into orders select * from temp_table")
     sql(s"insert into orders_overwrite select * from temp_table")
@@ -139,7 +139,7 @@ class TestInsertAndOtherCommandConcurrent
   }
 
   // block updating records from table which has index. see PR2483
-  ignore("update should fail if insert overwrite is in progress") {
+  test("update should fail if insert overwrite is in progress") {
     val future = runSqlAsync("insert overwrite table orders select * from 
orders_overwrite")
     val ex = intercept[ConcurrentOperationException] {
       sql("update orders set (o_country)=('newCountry') where 
o_country='china'").collect()
@@ -150,7 +150,7 @@ class TestInsertAndOtherCommandConcurrent
   }
 
   // block deleting records from table which has index. see PR2483
-  ignore("delete should fail if insert overwrite is in progress") {
+  test("delete should fail if insert overwrite is in progress") {
     val future = runSqlAsync("insert overwrite table orders select * from 
orders_overwrite")
     val ex = intercept[ConcurrentOperationException] {
       sql("delete from orders where o_country='china'").collect()
@@ -246,7 +246,7 @@ class TestInsertAndOtherCommandConcurrent
   }
 
   // block updating records from table which has index. see PR2483
-  ignore("update should fail if insert is in progress") {
+  test("update should fail if insert is in progress") {
     val future = runSqlAsync("insert into table orders select * from 
orders_overwrite")
     val ex = intercept[ConcurrentOperationException] {
       sql("update orders set (o_country)=('newCountry') where 
o_country='china'").collect()
@@ -257,7 +257,7 @@ class TestInsertAndOtherCommandConcurrent
   }
 
   // block deleting records from table which has index. see PR2483
-  ignore("delete should fail if insert is in progress") {
+  test("delete should fail if insert is in progress") {
     val future = runSqlAsync("insert into table orders select * from 
orders_overwrite")
     val ex = intercept[ConcurrentOperationException] {
       sql("delete from orders where o_country='china'").collect()
diff --git 
a/integration/spark/src/test/scala/org/apache/carbondata/view/rewrite/Tpcds_1_4_Suite.scala
 
b/integration/spark/src/test/scala/org/apache/carbondata/view/rewrite/Tpcds_1_4_Suite.scala
index 57ced1b379..d7c2c7fd3c 100644
--- 
a/integration/spark/src/test/scala/org/apache/carbondata/view/rewrite/Tpcds_1_4_Suite.scala
+++ 
b/integration/spark/src/test/scala/org/apache/carbondata/view/rewrite/Tpcds_1_4_Suite.scala
@@ -39,7 +39,8 @@ class Tpcds_1_4_Suite extends ModularPlanTest with 
BeforeAndAfter {
       hiveClient.runSqlHive(create_table)
     }
 
-    val writer = new PrintWriter(new File("batch.txt"))
+
+    val writer = new PrintWriter(new File(s"$target/batch.txt"))
 //    val dest = "case_30"
 //    val dest = "case_32"
 //    val dest = "case_33"
diff --git a/mv/plan/pom.xml b/mv/plan/pom.xml
index 9865ff781c..411fe9afc2 100644
--- a/mv/plan/pom.xml
+++ b/mv/plan/pom.xml
@@ -145,9 +145,6 @@
   <profiles>
     <profile>
       <id>spark-2.3</id>
-      <activation>
-        <activeByDefault>true</activeByDefault>
-      </activation>
       <properties>
         <spark.binary.version>2.3</spark.binary.version>
       </properties>
@@ -188,6 +185,9 @@
     </profile>
     <profile>
       <id>spark-2.4</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
       <properties>
         <spark.binary.version>2.4</spark.binary.version>
       </properties>
diff --git a/pom.xml b/pom.xml
index cc1ba9e9b6..9c175af405 100644
--- a/pom.xml
+++ b/pom.xml
@@ -127,10 +127,10 @@
     <httpclient.version>4.3.4</httpclient.version>
     <httpcore.version>4.3-alpha1</httpcore.version>
     <scala.binary.version>2.11</scala.binary.version>
-    <scala.version>2.11.8</scala.version>
+    <scala.version>2.11.12</scala.version>
     <hadoop.deps.scope>compile</hadoop.deps.scope>
-    <spark.version>2.3.4</spark.version>
-    <spark.binary.version>2.3</spark.binary.version>
+    <spark.version>2.4.5</spark.version>
+    <spark.binary.version>2.4</spark.binary.version>
     <antlr4.version>4.8</antlr4.version>
     <spark.deps.scope>compile</spark.deps.scope>
     <scala.deps.scope>compile</scala.deps.scope>
@@ -575,9 +575,6 @@
     </profile>
     <profile>
       <id>spark-2.3</id>
-      <activation>
-        <activeByDefault>true</activeByDefault>
-      </activation>
       <properties>
         <spark.binary.version>2.3</spark.binary.version>
         <spark.version>2.3.4</spark.version>
@@ -651,6 +648,9 @@
     </profile>
     <profile>
       <id>spark-2.4</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
       <properties>
         <spark.binary.version>2.4</spark.binary.version>
         <spark.version>2.4.5</spark.version>
diff --git a/streaming/pom.xml b/streaming/pom.xml
index 3889bf1b80..8c4095bc13 100644
--- a/streaming/pom.xml
+++ b/streaming/pom.xml
@@ -134,9 +134,6 @@
     </profile>
     <profile>
       <id>spark-2.3</id>
-      <activation>
-        <activeByDefault>true</activeByDefault>
-      </activation>
       <properties>
         <spark.binary.version>2.3</spark.binary.version>
       </properties>
@@ -175,6 +172,9 @@
     </profile>
     <profile>
       <id>spark-2.4</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
       <properties>
         <spark.binary.version>2.4</spark.binary.version>
       </properties>

Reply via email to