Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-28152][SQL][FOLLOWUP] Add a legacy conf for old MsSqlServerDialect numeric mapping #27184

Closed
wants to merge 1 commit into from
Closed

Conversation

dongjoon-hyun
Copy link
Member

@dongjoon-hyun dongjoon-hyun commented Jan 13, 2020

What changes were proposed in this pull request?

This is a follow-up for #25248 .

Why are the changes needed?

The new behavior cannot access the existing table which is created by old behavior.
This PR provides a way to avoid new behavior for the existing users.

Does this PR introduce any user-facing change?

Yes. This will fix the broken behavior on the existing tables.

How was this patch tested?

Pass the Jenkins and manually run JDBC integration test.

build/mvn install -DskipTests
build/mvn -Pdocker-integration-tests -pl :spark-docker-integration-tests_2.12 test

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-28152][SQL][FOLLOWUP][2.4] Add a legacy conf for old MsSqlServerDialect numeric mapping [SPARK-28152][SQL][FOLLOWUP] Add a legacy conf for old MsSqlServerDialect numeric mapping Jan 13, 2020
@dongjoon-hyun
Copy link
Member Author

Copy link
Member

@HyukjinKwon HyukjinKwon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@dongjoon-hyun
Copy link
Member Author

Thank you for review and approval, @HyukjinKwon !

@SparkQA
Copy link

SparkQA commented Jan 13, 2020

Test build #116601 has finished for PR 27184 at commit 6b92a9f.

  • This patch fails PySpark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@dongjoon-hyun
Copy link
Member Author

All Scala/Java test passed and the PySpark failure is due to a known test_memory_limit (pyspark.tests.test_worker.WorkerMemoryTest) flakiness. I also verified this in JDBC integration test manually. I'll merge this PR.

dongjoon-hyun added a commit that referenced this pull request Jan 13, 2020
…lect numeric mapping

This is a follow-up for #25248 .

The new behavior cannot access the existing table which is created by old behavior.
This PR provides a way to avoid new behavior for the existing users.

Yes. This will fix the broken behavior on the existing tables.

Pass the Jenkins and manually run JDBC integration test.
```
build/mvn install -DskipTests
build/mvn -Pdocker-integration-tests -pl :spark-docker-integration-tests_2.12 test
```

Closes #27184 from dongjoon-hyun/SPARK-28152-CONF.

Authored-by: Dongjoon Hyun <dhyun@apple.com>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
(cherry picked from commit 28fc043)
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
@maropu
Copy link
Member

maropu commented Jan 13, 2020

Late LGTM.

@@ -2161,6 +2161,13 @@ object SQLConf {
.booleanConf
.createWithDefault(true)

val LEGACY_MSSQLSERVER_NUMERIC_MAPPING_ENABLED =
buildConf("spark.sql.legacy.mssqlserver.numericMapping.enabled")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For such a change, could we have an item in the migration guide?

Copy link
Member Author

@dongjoon-hyun dongjoon-hyun Jan 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. Can we handle that after releasing 2.4.5 since It's a documentation change?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

val LEGACY_MSSQLSERVER_NUMERIC_MAPPING_ENABLED =
buildConf("spark.sql.legacy.mssqlserver.numericMapping.enabled")
.internal()
.doc("When true, use legacy MySqlServer SMALLINT and REAL type mapping.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not very clear what is the legacy MySqlServer SMALLINT and REAL type mapping if they do not read the PR. Could we make it clear? The behavior when the value is set to true and the behavior when the value is false

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course, I'd like to mention it at the migration guide fully.

@dongjoon-hyun
Copy link
Member Author

BTW, @gatorsmile . If you have any concern on 2.4.5 RC1, could you vote on the mailing list like @cloud-fan ? I want to collect all feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
5 participants