-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run iceberg tests as a separate suite.
Not all tests need to run as iceberg. Instead only run the SQL tests as iceberg in addition to running them as CSV to test base behavior. Signed-off-by: Adi Suresh <[email protected]>
- Loading branch information
Showing
7 changed files
with
84 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
...test/scala/org/opensearch/flint/spark/iceberg/FlintSparkIcebergCoveringIndexITSuite.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.opensearch.flint.spark.iceberg | ||
|
||
import org.opensearch.flint.spark.FlintSparkCoveringIndexSqlITSuite | ||
|
||
class FlintSparkIcebergCoveringIndexITSuite | ||
extends FlintSparkCoveringIndexSqlITSuite | ||
with FlintSparkIcebergSuite {} |
12 changes: 12 additions & 0 deletions
12
...t/scala/org/opensearch/flint/spark/iceberg/FlintSparkIcebergMaterializedViewITSuite.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.opensearch.flint.spark.iceberg | ||
|
||
import org.opensearch.flint.spark.FlintSparkMaterializedViewSqlITSuite | ||
|
||
class FlintSparkIcebergMaterializedViewITSuite | ||
extends FlintSparkMaterializedViewSqlITSuite | ||
with FlintSparkIcebergSuite {} |
12 changes: 12 additions & 0 deletions
12
...test/scala/org/opensearch/flint/spark/iceberg/FlintSparkIcebergSkippingIndexITSuite.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.opensearch.flint.spark.iceberg | ||
|
||
import org.opensearch.flint.spark.FlintSparkSkippingIndexSqlITSuite | ||
|
||
class FlintSparkIcebergSkippingIndexITSuite | ||
extends FlintSparkSkippingIndexSqlITSuite | ||
with FlintSparkIcebergSuite {} |
45 changes: 45 additions & 0 deletions
45
integ-test/src/test/scala/org/opensearch/flint/spark/iceberg/FlintSparkIcebergSuite.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.opensearch.flint.spark.iceberg | ||
|
||
import org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions | ||
import org.opensearch.flint.spark.FlintSparkExtensions | ||
import org.opensearch.flint.spark.FlintSparkSuite | ||
|
||
import org.apache.spark.SparkConf | ||
|
||
/** | ||
* Flint Spark suite tailored for Iceberg. | ||
*/ | ||
trait FlintSparkIcebergSuite extends FlintSparkSuite { | ||
|
||
// Override table type to Iceberg for this suite | ||
override lazy protected val tableType: String = "iceberg" | ||
|
||
// You can also override tableOptions if Iceberg requires different options | ||
override lazy protected val tableOptions: String = "" | ||
|
||
// Override the sparkConf method to include Iceberg-specific configurations | ||
override protected def sparkConf: SparkConf = { | ||
val conf = super.sparkConf | ||
// Set Iceberg-specific Spark configurations | ||
.set("spark.sql.catalog.spark_catalog", "org.apache.iceberg.spark.SparkSessionCatalog") | ||
.set("spark.sql.catalog.spark_catalog.type", "hadoop") | ||
.set("spark.sql.catalog.spark_catalog.warehouse", s"spark-warehouse/${suiteName}") | ||
.set( | ||
"spark.sql.extensions", | ||
List( | ||
classOf[IcebergSparkSessionExtensions].getName, | ||
classOf[FlintSparkExtensions].getName).mkString(", ")) | ||
conf | ||
} | ||
|
||
override def afterAll(): Unit = { | ||
deleteDirectory(s"spark-warehouse/${suiteName}") | ||
super.afterAll() | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters