urosstan-db commented on code in PR #50591:
URL: https://github.com/apache/spark/pull/50591#discussion_r2044543204
##########
connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/v2/MySQLIntegrationSuite.scala:
##########
@@ -59,6 +59,15 @@ class MySQLIntegrationSuite extends
DockerJDBCIntegrationV2Suite with V2JDBCTest
override val catalogName: String = "mysql"
override val db = new MySQLDatabaseOnDocker
+ override def defaultMetadata(
Review Comment:
This is common for MariaDB and MySQL JDBC driver?
##########
connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/v2/V2JDBCTest.scala:
##########
@@ -48,12 +48,26 @@ private[v2] trait V2JDBCTest extends SharedSparkSession
with DockerIntegrationFu
def notSupportsTableComment: Boolean = false
- def defaultMetadata(dataType: DataType = StringType): Metadata = new
MetadataBuilder()
+ def defaultMetadata(
+ dataType: DataType = StringType,
+ remoteTypeName: String = "STRING"): Metadata = new MetadataBuilder()
.putLong("scale", 0)
.putBoolean("isTimestampNTZ", false)
.putBoolean("isSigned", dataType.isInstanceOf[NumericType])
+ .putString("remoteTypeName", remoteTypeName)
.build()
+ def removeMetadataFromAllFields(structType: StructType, metadataKey:
String): StructType = {
Review Comment:
nit: maybe
```suggestion
def getSchemaWithoutFieldsMetadata(structType: StructType, metadataKey:
String): StructType = {
```
or just add doc to describe what function does, I think current name is also
ok in that case.
##########
connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/v2/MsSqlServerIntegrationSuite.scala:
##########
@@ -258,3 +268,8 @@ class MsSqlServerIntegrationSuite extends
DockerJDBCIntegrationV2Suite with V2JD
assert(rows(0).getString(0) === "amy")
}
}
+
+object MsSQLRemoteTypes {
Review Comment:
nit: Since we introduce another top level class for this file, I suggest to
make this singleton object part of suite class? Or to make constants in suite,
since object is used only here?
--
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]