Skip to content

Conversation

@cloud-fan
Copy link

No description provided.

import org.apache.spark.sql.test.SharedSQLContext
import org.apache.spark.sql.types.{LongType, StringType, StructType}

class DataSourceV2SQLSuite extends QueryTest with SharedSQLContext with BeforeAndAfter {
Copy link
Author

Choose a reason for hiding this comment

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

This is an end-to-end test, and we should really reflect the actual behaviors the end users will hit.

The major change I made here is to test with the real v2 session catalog, instead of a fake one.

@rdblue
Copy link
Owner

rdblue commented Jul 10, 2019

Overall, this looks good. It needs to be updated to avoid breaking v2 providers with the v2 session catalog.

This is also a new feature -- to add a CatalogManager to session state. I think we should finish apache#24768 and then follow up with this. We can discuss it in the sync.

@cloud-fan cloud-fan closed this Jul 11, 2019
rdblue pushed a commit that referenced this pull request Jul 3, 2020
…types

### What changes were proposed in this pull request?

This PR intends to fix a bug that occurs when comparing null types to decimal types in master/branch-3.0;
```
scala> Seq(BigDecimal(10)).toDF("v1").selectExpr("v1 = NULL").explain(true)
org.apache.spark.sql.AnalysisException: cannot resolve '(`v1` = NULL)' due to data type mismatch: differing types in '(`v1` = NULL)' (decimal(38,18) and null).; line 1 pos 0;
'Project [(v1#5 = null) AS (v1 = NULL)#7]
+- Project [value#2 AS v1#5]
   +- LocalRelation [value#2]
...
```
The query above passed in v2.4.5.

### Why are the changes needed?

bugfix

### Does this PR introduce any user-facing change?

No.

### How was this patch tested?

Added tests.

Closes apache#28241 from maropu/SPARK-31468.

Authored-by: Takeshi Yamamuro <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants