yaooqinn commented on code in PR #40543:
URL: https://github.com/apache/spark/pull/40543#discussion_r1148750975
##########
connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/v2/MySQLIntegrationSuite.scala:
##########
@@ -72,6 +72,8 @@ class MySQLIntegrationSuite extends
DockerJDBCIntegrationV2Suite with V2JDBCTest
s"mysql?user=root&password=rootpass&allowPublicKeyRetrieval=true&useSSL=false"
}
+ override val typeMapping: Map[DataType, DataType] = Map(StringType ->,
VarcharType(65535))
Review Comment:
These ITs are used to test datasource integrations with db2/mysql/pg/oracle,
etc. This override is added for cases that,
1. For oracle, we write VARCHAR2(255) directly when we use Spark's
StringType explicitly. (Well, I don't know why 255 and whether 255 is enough,
but not in the scope of this PR)
2. For MySQL, we use `TEXT/CLOB` as the JDBC type for Spark's StringType,
which seems correct, but MySQL JDBC returns varchar(65535) implicitly.
3. And other cases may be uncovered by the current tests that convert
Spark's DataTypes to char of external systems.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]