beliefer commented on a change in pull request #35166:
URL: https://github.com/apache/spark/pull/35166#discussion_r791386667
##########
File path:
external/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/v2/OracleIntegrationSuite.scala
##########
@@ -73,9 +75,25 @@ class OracleIntegrationSuite extends
DockerJDBCIntegrationSuite with V2JDBCTest
override def sparkConf: SparkConf = super.sparkConf
.set("spark.sql.catalog.oracle", classOf[JDBCTableCatalog].getName)
.set("spark.sql.catalog.oracle.url", db.getJdbcUrl(dockerIp, externalPort))
+ .set("spark.sql.catalog.oracle.pushDownAggregate", "true")
override val connectionTimeout = timeout(7.minutes)
- override def dataPreparation(conn: Connection): Unit = {}
+
+ override def dataPreparation(conn: Connection): Unit = {
+ conn.prepareStatement(
+ "CREATE TABLE employee (dept NUMBER(32), name VARCHAR2(32), salary
NUMBER(20, 2)," +
+ " bonus BINARY_DOUBLE)").executeUpdate()
+ conn.prepareStatement("INSERT INTO employee VALUES (1, 'amy', 10000,
1000)")
+ .executeUpdate()
+ conn.prepareStatement("INSERT INTO employee VALUES (2, 'alex', 12000,
1200)")
+ .executeUpdate()
+ conn.prepareStatement("INSERT INTO employee VALUES (1, 'cathy', 9000,
1200)")
+ .executeUpdate()
+ conn.prepareStatement("INSERT INTO employee VALUES (2, 'david', 10000,
1300)")
+ .executeUpdate()
+ conn.prepareStatement("INSERT INTO employee VALUES (6, 'jen', 12000,
1200)")
Review comment:
First, each database supports different data types? There is no common
CREATE TABLE statement.
Second, some databases support insert into table Values followed by multiple
lines in succession. For example, Oracle does not support this syntax and only
supports inserting one by one.
In addition, the performance of inserting multiple items at one time is
generally better than inserting one item multiple times.
--
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]