Skip to content

Conversation

@rajeshbalamohan
Copy link

@rajeshbalamohan rajeshbalamohan commented Apr 25, 2016

What changes were proposed in this pull request?

LazilyGenerateOrdering throws NullPointerException when clubbed with TakeOrderedAndProjectExec. This causes simple queries like "select i_item_id from item order by i_item_id limit 10;" would fail in spark-sql. Detailed explain plan and stack traces are available in SPARK-14752. When deserializing in DirectTaskResult, it goes through nested structure in Kryo causing NPE for generatedOrdering.

How was this patch tested?

Manual testing by running multiple SQL queries in multi node cluster.

@SparkQA
Copy link

SparkQA commented Apr 25, 2016

Test build #56897 has finished for PR 12661 at commit e83c9bc.

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

@davies
Copy link
Contributor

davies commented May 5, 2016

Could you add an regression test?

private[this] var generatedOrdering = GenerateOrdering.generate(ordering)

def compare(a: InternalRow, b: InternalRow): Int = {
if (generatedOrdering == null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should making the generatedOrdering as lazy val be enough?

see http://fdahms.com/2015/10/14/scala-and-the-transient-lazy-val-pattern/

@bomeng
Copy link
Contributor

bomeng commented May 16, 2016

Since this one has been here for more than 10 days, I've provided another approach with new test case. Please take a look. Thanks.
PR for SPARK-14752

@JoshRosen
Copy link
Contributor

@rajeshbalamohan, it appears that this issue has been fixed by #13466, so do you mind closing your pull request? Thanks!

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.

6 participants