cloud-fan commented on a change in pull request #24469: [SPARK-27576][SQL]
table capability to skip the output column resolution
URL: https://github.com/apache/spark/pull/24469#discussion_r284590080
##########
File path:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/DataSourceV2AnalysisSuite.scala
##########
@@ -446,6 +452,27 @@ abstract class DataSourceV2AnalysisSuite extends
AnalysisTest {
"Cannot safely cast", "'x'", "DoubleType to FloatType"))
}
+ test("bypass output column resolution") {
+ val table = TestRelationAcceptAnySchema(StructType(Seq(
+ StructField("a", FloatType, nullable = false),
+ StructField("b", DoubleType))).toAttributes)
+
+ val query = TestRelation(StructType(Seq(
+ StructField("s", StringType))).toAttributes)
+
+ withClue("byName") {
+ val parsedPlan = byName(table, query)
+ assertResolved(parsedPlan)
+ checkAnalysis(parsedPlan, parsedPlan)
+ }
+
+ withClue("byPosition") {
Review comment:
I'll send a followup PR to update the entire test suite to use `withClue`
later.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]