Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: Peng Huo <[email protected]>
  • Loading branch information
penghuo committed Jun 27, 2024
1 parent e506fc0 commit 190edf4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ import org.apache.spark.sql.util.CaseInsensitiveStringMap
* @param userSpecifiedSchema
* userSpecifiedSchema
*/
class FlintReadOnlyTable(conf: util.Map[String, String], userSpecifiedSchema: Option[StructType])
class FlintReadOnlyTable(
val conf: util.Map[String, String],
val userSpecifiedSchema: Option[StructType])
extends Table
with SupportsRead {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ import org.apache.spark.sql.types.StructType
* @param userSpecifiedSchema
* userSpecifiedSchema
*/
case class FlintTable(conf: util.Map[String, String], userSpecifiedSchema: Option[StructType])
case class FlintTable(
override val conf: util.Map[String, String],
override val userSpecifiedSchema: Option[StructType])
extends FlintReadOnlyTable(conf, userSpecifiedSchema)
with SupportsWrite {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import org.apache.spark.FlintSuite
import org.apache.spark.sql.catalyst.analysis.NoSuchTableException
import org.apache.spark.sql.connector.catalog.{Identifier, TableChange}
import org.apache.spark.sql.connector.expressions.Transform
import org.apache.spark.sql.flint.FlintTable
import org.apache.spark.sql.flint.FlintReadOnlyTable
import org.apache.spark.sql.types.StructType
import org.apache.spark.sql.util.CaseInsensitiveStringMap

Expand Down Expand Up @@ -71,7 +71,7 @@ class OpenSearchCatalogTest
table should not be null
table.name() should be("table1")

val flintTableConf = FlintTable.unapply(table.asInstanceOf[FlintTable]).get._1
val flintTableConf = table.asInstanceOf[FlintReadOnlyTable].conf
flintTableConf.get("port") should be("9200")
flintTableConf.get("scheme") should be("http")
flintTableConf.get("auth") should be("noauth")
Expand Down

0 comments on commit 190edf4

Please sign in to comment.