-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-20431][SS][FOLLOWUP] Specify a schema by using a DDL-formatted string in DataStreamReader #18373
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
Conversation
|
Test build #78352 has started for PR 18373 at commit |
|
cc @gatorsmile, @zsxwing and @maropu. |
| test("SPARK-20431: Specify a schema by using a DDL-formatted string") { | ||
| spark.readStream | ||
| .format("org.apache.spark.sql.streaming.test") | ||
| .schema("aa integer") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Capitalize integer? (I remember @gatorsmile suggested before)
|
Thanks for follow-up! IMHO this syntax helps much, so we could support this in other cases for defining schemas (e.g., |
|
test this please |
|
I skimmed Please let me know. If we are not sure for now, I guess it might be okay as is as a proper follow-up. |
|
Thanks for triggering tests and fixing Jenkins @shaneknapp. |
|
Test build #78354 has finished for PR 18373 at commit
|
|
Test build #78367 has finished for PR 18373 at commit
|
|
@amoussoubaruch, sounds unrelated with this PR. Probably, question should go to mailing list. |
|
cc @cloud-fan, would you have some time to look into this maybe? |
|
thanks, merging to master! @amoussoubaruch please post your question to dev list, instead of randomly picking a PR... |
… string in DataStreamReader
## What changes were proposed in this pull request?
This pr supported a DDL-formatted string in `DataStreamReader.schema`.
This fix could make users easily define a schema without importing the type classes.
For example,
```scala
scala> spark.readStream.schema("col0 INT, col1 DOUBLE").load("/tmp/abc").printSchema()
root
|-- col0: integer (nullable = true)
|-- col1: double (nullable = true)
```
## How was this patch tested?
Added tests in `DataStreamReaderWriterSuite`.
Author: hyukjinkwon <[email protected]>
Closes apache#18373 from HyukjinKwon/SPARK-20431.
What changes were proposed in this pull request?
This pr supported a DDL-formatted string in
DataStreamReader.schema.This fix could make users easily define a schema without importing the type classes.
For example,
How was this patch tested?
Added tests in
DataStreamReaderWriterSuite.