Skip to content

Conversation

@jaceklaskowski
Copy link
Contributor

…adoc

What changes were proposed in this pull request?

Use recommended values for row boundaries in Window's scaladoc, i.e. Window.unboundedPreceding, Window.unboundedFollowing, and Window.currentRow (that were introduced in 2.1.0).

How was this patch tested?

Local build

@SparkQA
Copy link

SparkQA commented Mar 24, 2017

Test build #75180 has finished for PR 17417 at commit efc420b.

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

@SparkQA
Copy link

SparkQA commented Mar 25, 2017

Test build #75183 has finished for PR 17417 at commit 07a36f8.

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

Copy link
Member

@srowen srowen left a comment

Choose a reason for hiding this comment

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

I'm not sure any of these changes are necessary?

Copy link
Member

Choose a reason for hiding this comment

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

These are used with DataFrames, right? At least that's what I have used Window for, am I missing something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure. I'm going to revert the changes. There's a little value in them. I'd rather see the changes approved in general than fight for DataFrame vs Dataset.

p.s. There's no DataFrame in Spark SQL which is just a type alias of Dataset[Row] -- see https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/package.scala#L46.

Copy link
Member

Choose a reason for hiding this comment

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

It's an alias, yes, but it certainly exists as a user-facing type.

Copy link
Member

Choose a reason for hiding this comment

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

I think the right phrasing is: "are positions relative to the current row". The current text is OK IMHO

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll fix it to be more accurate (that's the purpose of this particular change so the more accurate the merrier). Thanks!

Copy link
Member

Choose a reason for hiding this comment

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

"We recommend that users use" is correct, but 'that' can be omitted and it's still correct.
I think the backticks are on purpose as many scaladoc refs like this also cause doc failures. At least you need to verify this before changing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Leaving 'that' aside is incorrect -- see http://dictionary.cambridge.org/dictionary/english/recommend where to is even highlighted to make the point.

Copy link
Member

Choose a reason for hiding this comment

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

Why this change? 0 should mean current row.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See the above change where Spark devs "recommend that users use" the values by their aliases not their numeric values.

Copy link
Member

Choose a reason for hiding this comment

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

Got it, and I think there are also doc examples like this in Column.scala and WindowSpec.scala that could be similarly improved

@SparkQA
Copy link

SparkQA commented Mar 25, 2017

Test build #75217 has finished for PR 17417 at commit 07001a9.

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

Copy link
Member

Choose a reason for hiding this comment

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

Either way is correct, it wasn't wrong

Copy link
Member

Choose a reason for hiding this comment

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

Likewise this is effectively identical. I wouldn't make changes like this

@SparkQA
Copy link

SparkQA commented Mar 26, 2017

Test build #75240 has finished for PR 17417 at commit bf82dc6.

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

@jaceklaskowski
Copy link
Contributor Author

Hey @srowen Would appreciate your looking at the changes again and comments (or merge). Thanks!

@srowen
Copy link
Member

srowen commented Mar 27, 2017

How about the other files I mentioned? I think they can take similar changes. I think you can roll your other PR into this. They're both kinda misc doc improvements.

@jaceklaskowski
Copy link
Contributor Author

I'm going to merge the two PRs with your comments applied (i.e. excluding changes that are not necessarily doc-only). Thanks a lot for your time, Sean. Appreciate a lot.

@jaceklaskowski jaceklaskowski force-pushed the window-expression-scaladoc branch from bf82dc6 to 802c150 Compare March 29, 2017 09:53
@jaceklaskowski jaceklaskowski changed the title [SQL][DOC] Use recommended values for row boundaries in Window's scal… [DOC] Doc-only improvements Mar 29, 2017
@jaceklaskowski jaceklaskowski changed the title [DOC] Doc-only improvements [DOCS] Doc-only improvements Mar 29, 2017
@jaceklaskowski jaceklaskowski changed the title [DOCS] Doc-only improvements [DOCS] Docs-only improvements Mar 29, 2017
@SparkQA
Copy link

SparkQA commented Mar 29, 2017

Test build #75352 has finished for PR 17417 at commit 0c4a77e.

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

@SparkQA
Copy link

SparkQA commented Mar 29, 2017

Test build #75353 has finished for PR 17417 at commit 8dc1f04.

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

@jaceklaskowski
Copy link
Contributor Author

Executed cd docs && SKIP_PYTHONDOC=1 SKIP_RDOC=1 jekyll serve to check the changes and they've seemed fine. I had to fix some extra javadoc-related places to please jekyll.

@srowen Ready to review the changes once more? Thanks.

@SparkQA
Copy link

SparkQA commented Mar 29, 2017

Test build #75354 has finished for PR 17417 at commit e09802d.

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

@SparkQA
Copy link

SparkQA commented Mar 29, 2017

Test build #75355 has finished for PR 17417 at commit db426e3.

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

Copy link
Member

@srowen srowen left a comment

Choose a reason for hiding this comment

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

Most of this looks fine to me, but I have a few questions still about the changes.

Copy link
Member

Choose a reason for hiding this comment

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

Why remove this particular comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

HashShuffleWriter is long gone.

Copy link
Member

Choose a reason for hiding this comment

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

I get that this is redundant, or happens to be right now, but I don't think I'd remove it in a docs-only change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct. Reverting...

Copy link
Member

Choose a reason for hiding this comment

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

This is a no-op change, I'd avoid this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Almost. I replaced a with the and added an before expression.

Copy link
Member

Choose a reason for hiding this comment

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

Is this for consistency? it also seems not worth changing otherwise

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Consistency (and one of the recommended coding styles of mine).

@jaceklaskowski jaceklaskowski force-pushed the window-expression-scaladoc branch from f21f434 to 913dbb8 Compare March 29, 2017 20:26
@SparkQA
Copy link

SparkQA commented Mar 29, 2017

Test build #75368 has finished for PR 17417 at commit 913dbb8.

  • This patch passes all tests.
  • This patch does not merge cleanly.
  • This patch adds no public classes.

@srowen
Copy link
Member

srowen commented Mar 30, 2017

Looks good, just needs a rebase now

@jaceklaskowski jaceklaskowski force-pushed the window-expression-scaladoc branch from 913dbb8 to ae57b33 Compare March 30, 2017 11:26
@SparkQA
Copy link

SparkQA commented Mar 30, 2017

Test build #75388 has finished for PR 17417 at commit ae57b33.

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

@srowen
Copy link
Member

srowen commented Mar 30, 2017

Merged to master

@asfgit asfgit closed this in 0197262 Mar 30, 2017
@jaceklaskowski jaceklaskowski deleted the window-expression-scaladoc branch March 30, 2017 15:21
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.

3 participants