This is an automated email from the ASF dual-hosted git repository. dongjoon pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push: new 39500a315166 [SPARK-47522][SQL][FOLLOWUP] Add float(p) values for MySQLIntegrationSuite 39500a315166 is described below commit 39500a315166d8e342b678ef3038995a03ce84d6 Author: Kent Yao <y...@apache.org> AuthorDate: Fri Mar 22 13:23:51 2024 -0700 [SPARK-47522][SQL][FOLLOWUP] Add float(p) values for MySQLIntegrationSuite ### What changes were proposed in this pull request? Add float(p) values for MySQLIntegrationSuite ### Why are the changes needed? test improvements ### Does this PR introduce _any_ user-facing change? no ### How was this patch tested? new test cases ### Was this patch authored or co-authored using generative AI tooling? no Closes #45672 from yaooqinn/SPARK-47522-F. Authored-by: Kent Yao <y...@apache.org> Signed-off-by: Dongjoon Hyun <dh...@apple.com> --- .../scala/org/apache/spark/sql/jdbc/MySQLIntegrationSuite.scala | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/MySQLIntegrationSuite.scala b/connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/MySQLIntegrationSuite.scala index cd3001311b03..921e63acf7e1 100644 --- a/connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/MySQLIntegrationSuite.scala +++ b/connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/MySQLIntegrationSuite.scala @@ -79,8 +79,10 @@ class MySQLIntegrationSuite extends DockerJDBCIntegrationSuite { conn.prepareStatement("INSERT INTO strings VALUES ('the', 'quick', 'brown', 'fox', " + "'jumps', 'over', 'the', 'lazy', 'dog', '{\"status\": \"merrily\"}')").executeUpdate() - conn.prepareStatement("CREATE TABLE floats (f1 FLOAT, f2 FLOAT UNSIGNED)").executeUpdate() - conn.prepareStatement("INSERT INTO floats VALUES (1.23, 4.56)").executeUpdate() + conn.prepareStatement("CREATE TABLE floats (f1 FLOAT, f2 FLOAT(10), f3 FLOAT(53), " + + "f4 FLOAT UNSIGNED, f5 FLOAT(10) UNSIGNED, f6 FLOAT(53) UNSIGNED)").executeUpdate() + conn.prepareStatement("INSERT INTO floats VALUES (1.23, 4.56, 7.89, 1.23, 4.56, 7.89)") + .executeUpdate() } test("Basic test") { @@ -267,6 +269,6 @@ class MySQLIntegrationSuite extends DockerJDBCIntegrationSuite { test("SPARK-47522: Read MySQL FLOAT as FloatType to keep consistent with the write side") { val df = spark.read.jdbc(jdbcUrl, "floats", new Properties) - checkAnswer(df, Row(1.23f, 4.56d)) + checkAnswer(df, Row(1.23f, 4.56f, 7.89d, 1.23d, 4.56d, 7.89d)) } } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org