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-20694][EXAMPLES]Update SQLDataSourceExample.scala #20052

Closed
wants to merge 1 commit into from
Closed

[SPARK-20694][EXAMPLES]Update SQLDataSourceExample.scala #20052

wants to merge 1 commit into from

Conversation

CNRui
Copy link
Contributor

@CNRui CNRui commented Dec 22, 2017

What changes were proposed in this pull request?

Create table using the right DataFrame. peopleDF->usersDF

peopleDF:
+----+-------+
| age| name|
+----+-------+
usersDF:
+------+--------------+----------------+
| name|favorite_color|favorite_numbers|
+------+--------------+----------------+

How was this patch tested?

Manually tested.

Create table using the right DataFrame. peopleDF->usersDF
@gatorsmile
Copy link
Member

gatorsmile commented Dec 22, 2017

Can you attached the screenshot of the generated doc after applying this PR?

@CNRui
Copy link
Contributor Author

CNRui commented Dec 22, 2017

peopleDF.show()
+----+-------+
| age| name|
+----+-------+
|null|Michael|
| 30| Andy|
| 19| Justin|
+----+-------+

peopleDF
.write
.partitionBy("favorite_color")
.bucketBy(42, "name")
.saveAsTable("people_partitioned_bucketed")

Exception in thread "main" java.lang.RuntimeException: Partition column favorite_color not found in schema StructType(StructField(age,LongType,true), StructField(name,StringType,true))

@SparkQA
Copy link

SparkQA commented Dec 22, 2017

Test build #4022 has finished for PR 20052 at commit 770d614.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@srowen
Copy link
Member

srowen commented Dec 23, 2017

Merged to master/2.2

asfgit pushed a commit that referenced this pull request Dec 23, 2017
## What changes were proposed in this pull request?

Create table using the right DataFrame. peopleDF->usersDF

peopleDF:
+----+-------+
| age|   name|
+----+-------+
usersDF:
+------+--------------+----------------+
|  name|favorite_color|favorite_numbers|
+------+--------------+----------------+

## How was this patch tested?

Manually tested.

Author: CNRui <13266776177@163.com>

Closes #20052 from CNRui/patch-2.

(cherry picked from commit ea2642e)
Signed-off-by: Sean Owen <sowen@cloudera.com>
@asfgit asfgit closed this in ea2642e Dec 23, 2017
MatthewRBruce pushed a commit to Shopify/spark that referenced this pull request Jul 31, 2018
## What changes were proposed in this pull request?

Create table using the right DataFrame. peopleDF->usersDF

peopleDF:
+----+-------+
| age|   name|
+----+-------+
usersDF:
+------+--------------+----------------+
|  name|favorite_color|favorite_numbers|
+------+--------------+----------------+

## How was this patch tested?

Manually tested.

Author: CNRui <13266776177@163.com>

Closes apache#20052 from CNRui/patch-2.

(cherry picked from commit ea2642e)
Signed-off-by: Sean Owen <sowen@cloudera.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants