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

Fix unusable method if DataFrame wanted instead of DataFrameStreaming #309

Open
wants to merge 1 commit into
base: 2.4
Choose a base branch
from

Conversation

piffall
Copy link

@piffall piffall commented Apr 10, 2019

In DataFrameReaderFunctions there is an unusable method method if DataFrame is wanted instead of Streaming DataFrame with this signature: def cosmosDB(schema: StructType, readConfig: Config, sqlContext: SQLContext): DataFrame

This calls a private method that should receive an Option[SQLContext] argument, but it's not possible when using Some(null), because this will create a Some[Null] type value. To fix this, Option(sqlContext) is used instead of Some(sqlContext) in order to pass a None value. Other Optionals are changed too.

This PR should be cherry-picked to 2.3 branch. Branches 2.2 and 2.1 are not affected.

@msftclas
Copy link

msftclas commented Apr 10, 2019

CLA assistant check
All CLA requirements met.

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