Skip to content

Conversation

@cloud-fan
Copy link
Contributor

If the order-by expression is already in child's output, we can just reference it instead of evaluate it agian.

@cloud-fan
Copy link
Contributor Author

cc @marmbrus

@cloud-fan
Copy link
Contributor Author

retest this please.

@SparkQA
Copy link

SparkQA commented Aug 10, 2015

Test build #40290 has finished for PR 8066 at commit eaa6002.

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

Copy link
Contributor

Choose a reason for hiding this comment

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

I would be good if we could just do this as part of CleanAliases in #7957. Basically it seems that there is no reason to have an Alias except as a top level expression in Project or Aggregate.

@cloud-fan cloud-fan force-pushed the order-by branch 2 times, most recently from a1fabce to abc0fc3 Compare August 15, 2015 13:32
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can't do this optimization in Analyzer.ResolveSortReferences as the aggregate expressions inside ordering expression are unresolved at that time. We need to add them to underlying Aggregate first and let other rules to resolve them.

@SparkQA
Copy link

SparkQA commented Aug 15, 2015

Test build #40960 has finished for PR 8066 at commit abc0fc3.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Aug 15, 2015

Test build #40965 has finished for PR 8066 at commit 30fceb9.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Aug 15, 2015

Test build #40962 has finished for PR 8066 at commit 28eb6bb.

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

@SparkQA
Copy link

SparkQA commented Aug 15, 2015

Test build #40964 has finished for PR 8066 at commit 9f2c1c3.

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Use semanticEquals or sameRef instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We should not do this optimization during analysis. Logically optimizations should go into Optimizer, and for this case, the match may fail because of non-complete Cast expressions caused by type coercion rules

@SparkQA
Copy link

SparkQA commented Sep 7, 2015

Test build #42098 has finished for PR 8066 at commit a2626fb.

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

@cloud-fan
Copy link
Contributor Author

ping @marmbrus

@SparkQA
Copy link

SparkQA commented Sep 23, 2015

Test build #42870 has finished for PR 8066 at commit 57405b3.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • class WriterThread(

@cloud-fan
Copy link
Contributor Author

Hi @marmbrus , I updated it and did some simplification, could you take a look? Thanks!

@SparkQA
Copy link

SparkQA commented Dec 2, 2015

Test build #47071 has finished for PR 8066 at commit 772dc7f.

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

Copy link
Contributor

Choose a reason for hiding this comment

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

nit: could you do e.asc instead?

@SparkQA
Copy link

SparkQA commented Dec 2, 2015

Test build #47073 has finished for PR 8066 at commit a3e1313.

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: to follow the other suites this would probably be SortOptimizationSuite

Copy link
Contributor

Choose a reason for hiding this comment

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

Would this be simpler as a find?

@marmbrus
Copy link
Contributor

marmbrus commented Dec 2, 2015

A few minor comments, overall LGTM.

@cloud-fan cloud-fan force-pushed the order-by branch 3 times, most recently from d5fdeff to 1cc52f2 Compare December 3, 2015 14:02
@SparkQA
Copy link

SparkQA commented Dec 3, 2015

Test build #47138 has finished for PR 8066 at commit 79f2dc9.

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

@SparkQA
Copy link

SparkQA commented Dec 3, 2015

Test build #47141 has finished for PR 8066 at commit d5fdeff.

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

@SparkQA
Copy link

SparkQA commented Dec 3, 2015

Test build #47142 has finished for PR 8066 at commit 1cc52f2.

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

@SparkQA
Copy link

SparkQA commented Apr 21, 2016

Test build #56519 has finished for PR 8066 at commit e023482.

  • This patch fails Scala style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Apr 21, 2016

Test build #56521 has finished for PR 8066 at commit af1a83d.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@cloud-fan
Copy link
Contributor Author

retest this please.

@SparkQA
Copy link

SparkQA commented Apr 22, 2016

Test build #56624 has finished for PR 8066 at commit af1a83d.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Apr 22, 2016

Test build #56666 has finished for PR 8066 at commit 4baaf55.

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

@rxin
Copy link
Contributor

rxin commented Jul 7, 2016

Close this?

@cloud-fan cloud-fan closed this Jul 7, 2016
@HyukjinKwon
Copy link
Member

Do you mind if I ask why it was asked to be closed? (I am just purely curious while looking through PRs and JIRAs).

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