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

Chapter 7 Wrong code in the window function example #39

Open
xuewei4d opened this issue May 17, 2019 · 2 comments
Open

Chapter 7 Wrong code in the window function example #39

xuewei4d opened this issue May 17, 2019 · 2 comments

Comments

@xuewei4d
Copy link

dfWithDate.where("CustomerId IS NOT NULL").orderBy("CustomerId")

First, the column Quantity is parsed as String. It should be IntegerType.

Second orderBy(CustomerId) should be orderBy(desc(Quantity))

@xuewei4d xuewei4d changed the title Chapter 7 Wrong code in the window function Chapter 7 Wrong code in the window function example May 17, 2019
@bllchmbrs
Copy link
Contributor

want to just open a pull request if you're seeing something wrong?

@shanmugavel04
Copy link

@xuewei4d
===> I ran the below command - dfWithDate.printSchema() resulted in Quantity as an IntegerType
root
|-- InvoiceNo: string (nullable = true)
|-- StockCode: string (nullable = true)
|-- Description: string (nullable = true)
|-- Quantity: integer (nullable = true)
|-- InvoiceDate: string (nullable = true)
|-- UnitPrice: double (nullable = true)
|-- CustomerID: integer (nullable = true)
|-- Country: string (nullable = true)
|-- date: date (nullable = true)
===> orderBy("CustomerId") or orderBy($"Quantity".desc) resulted in the same result.

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

No branches or pull requests

3 participants