Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ final class DataStreamReader private[sql](sparkSession: SparkSession)
/** @inheritdoc */
def table(tableName: String): DataFrame = {
require(tableName != null, "The table name can't be null")
assertNoSpecifiedSchema("table")
val identifier = sparkSession.sessionState.sqlParser.parseMultipartIdentifier(tableName)
val unresolved = UnresolvedRelation(
identifier,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,22 +84,6 @@ class DataStreamTableAPISuite extends StreamTest with BeforeAndAfter {
checkErrorTableNotFound(e, "`non_exist_table`")
}

test("read: user-specified schema is not allowed with table API") {
val tblName = "my_table"
withTable(tblName) {
spark.range(3).write.format("parquet").saveAsTable(tblName)
val e = intercept[AnalysisException] {
spark.readStream
.schema(new StructType().add("a", IntegerType))
.table(tblName)
}
checkError(
exception = e,
condition = "_LEGACY_ERROR_TEMP_1189",
parameters = Map("operation" -> "table"))
}
}

test("read: stream table API with temp view") {
val tblName = "my_table"
val stream = MemoryStream[Int]
Expand Down