Skip to content

[MINOR][DOC] Fix Java example code in Column's comments#22069

Closed
da-liii wants to merge 1 commit intoapache:masterfrom
da-liii:fix_doc_minor
Closed

[MINOR][DOC] Fix Java example code in Column's comments#22069
da-liii wants to merge 1 commit intoapache:masterfrom
da-liii:fix_doc_minor

Conversation

@da-liii
Copy link
Copy Markdown
Contributor

@da-liii da-liii commented Aug 10, 2018

What changes were proposed in this pull request?

Fix scaladoc in Column

How was this patch tested?

None

@HyukjinKwon
Copy link
Copy Markdown
Member

ok to test

@SparkQA
Copy link
Copy Markdown

SparkQA commented Aug 10, 2018

Test build #94555 has finished for PR 22069 at commit 8520df8.

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

@kiszk
Copy link
Copy Markdown
Member

kiszk commented Aug 10, 2018

Do we need to update the following similar examples, too?

Column.scala

   * {{{
   *   // Example: encoding gender string column into integer.
   *
   *   // Scala:
   *   people.select(when(people("gender") === "male", 0)
   *     .when(people("gender") === "female", 1)
   *     .otherwise(2))
   *
   *   // Java:
   *   people.select(when(col("gender").equalTo("male"), 0)
   *     .when(col("gender").equalTo("female"), 1)
   *     .otherwise(2))
   * }}}

functions.scala

   * {{{
   *   // Example: encoding gender string column into integer.
   *
   *   // Scala:
   *   people.select(when(people("gender") === "male", 0)
   *     .when(people("gender") === "female", 1)
   *     .otherwise(2))
   *
   *   // Java:
   *   people.select(when(col("gender").equalTo("male"), 0)
   *     .when(col("gender").equalTo("female"), 1)
   *     .otherwise(2))
   * }}}

@SparkQA
Copy link
Copy Markdown

SparkQA commented Aug 10, 2018

Test build #4239 has finished for PR 22069 at commit 8520df8.

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

@HyukjinKwon
Copy link
Copy Markdown
Member

Yea if there are more instances found, we better fix them together

@HyukjinKwon
Copy link
Copy Markdown
Member

retest this please

@SparkQA
Copy link
Copy Markdown

SparkQA commented Aug 11, 2018

Test build #94595 has finished for PR 22069 at commit 8520df8.

  • This patch fails due to an unknown error code, -9.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HyukjinKwon
Copy link
Copy Markdown
Member

retest this please

@SparkQA
Copy link
Copy Markdown

SparkQA commented Aug 11, 2018

Test build #94613 has finished for PR 22069 at commit 8520df8.

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

@HyukjinKwon
Copy link
Copy Markdown
Member

retest this please

@SparkQA
Copy link
Copy Markdown

SparkQA commented Aug 11, 2018

Test build #94620 has finished for PR 22069 at commit 8520df8.

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

@srowen
Copy link
Copy Markdown
Member

srowen commented Aug 11, 2018

@sadhen what do you think of @Kisks 's comment -- a few more occurrences maybe?

@srowen
Copy link
Copy Markdown
Member

srowen commented Aug 12, 2018

I'm going to merge this, as the additional example quoted above should actually work, assuming one imported the 'col' function. In Java, people("foo") would be wrong but col("foo") is not (necessarily).

@asfgit asfgit closed this in a90b1f5 Aug 12, 2018
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.

5 participants