urosstan-db commented on code in PR #50591: URL: https://github.com/apache/spark/pull/50591#discussion_r2044550940
########## connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/v2/V2JDBCTest.scala: ########## @@ -152,7 +178,11 @@ private[v2] trait V2JDBCTest extends SharedSparkSession with DockerIntegrationFu val t = spark.table(s"$catalogName.alt_table") val expectedSchema = new StructType() .add("C2", StringType, true, defaultMetadata()) - assert(t.schema === expectedSchema) + val expectedSchemaWithoutRemoteTypeName = + removeMetadataFromAllFields(expectedSchema, "remoteTypeName") + val schemaWithoutRemoteTypeName = + removeMetadataFromAllFields(t.schema, "remoteTypeName") + assert(schemaWithoutRemoteTypeName === expectedSchemaWithoutRemoteTypeName) Review Comment: I know this is not your change, but it is better to use `assertResult` than `assert` whenever it is possible, since assertResult gives better error message. Assert failure would return "Schema(...) did not equal Schema(...)" while AssertResult failure would return "Expected schemas is Schema(...), while actual one is Schema(...)" -- 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. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org