Skip to content

Conversation

@viirya
Copy link
Member

@viirya viirya commented Jun 15, 2015

@SparkQA
Copy link

SparkQA commented Jun 15, 2015

Test build #34917 has finished for PR 6823 at commit ef4a21a.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class Sqrt(child: Expression) extends UnaryMathExpression(math.sqrt, "SQRT")

@SparkQA
Copy link

SparkQA commented Jun 15, 2015

Test build #34919 has finished for PR 6823 at commit 297cc90.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class Sqrt(child: Expression) extends UnaryMathExpression(math.sqrt, "SQRT")

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we need to move this test case from arithmetic cases to math test cases.

Copy link
Member Author

Choose a reason for hiding this comment

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

math test cases already have similar tests. If we don't need it here, we can remove it from arithmetic cases.

@cloud-fan
Copy link
Contributor

Hi @viirya, could you also remove the type check test for Sqrt here? And remove the type cast rule for Sqrt here

@SparkQA
Copy link

SparkQA commented Jun 15, 2015

Test build #34921 has finished for PR 6823 at commit d38492f.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class Sqrt(child: Expression) extends UnaryMathExpression(math.sqrt, "SQRT")

@SparkQA
Copy link

SparkQA commented Jun 15, 2015

Test build #34939 has finished for PR 6823 at commit bc2ed77.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class Sqrt(child: Expression) extends UnaryMathExpression(math.sqrt, "SQRT")

Copy link
Contributor

Choose a reason for hiding this comment

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

isn't 2^24 super large? why are we doing this in a unit test?

Copy link
Member Author

Choose a reason for hiding this comment

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

They are moved from the test of sqrt in ArithmeticExpressionSuite. Is it better to directly remove them?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can just pick a few numbers out of that. There isn't much benefit to test a lot of numbers here.

Conflicts:
	sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/arithmetic.scala
Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, I think this should be 1.5.0 too.

Copy link
Contributor

Choose a reason for hiding this comment

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

sorry what I meant was writing out the sqrt value explicitly ... rather than relying on some sequence

Copy link
Member Author

Choose a reason for hiding this comment

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

ok. sorry I misunderstand that.

Copy link
Contributor

Choose a reason for hiding this comment

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

actually - question: why having this when you already have the testUnary call up there?

Copy link
Contributor

Choose a reason for hiding this comment

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

maybe this is doing something I am not understanding yet

Copy link
Member Author

Choose a reason for hiding this comment

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

They are old tests in ArithmeticExpressionSuite. I think we can remove them.

@SparkQA
Copy link

SparkQA commented Jun 18, 2015

Test build #35111 has finished for PR 6823 at commit 8977e11.

  • This patch fails MiMa tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class Sqrt(child: Expression) extends UnaryMathExpression(math.sqrt, "SQRT")

@SparkQA
Copy link

SparkQA commented Jun 18, 2015

Test build #35102 has finished for PR 6823 at commit 8dff6d1.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class Sqrt(child: Expression) extends UnaryMathExpression(math.sqrt, "SQRT")

@SparkQA
Copy link

SparkQA commented Jun 18, 2015

Test build #35103 has finished for PR 6823 at commit 699f48b.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • class ElementwiseProduct(VectorTransformer):
    • case class Sqrt(child: Expression) extends UnaryMathExpression(math.sqrt, "SQRT")
    • // Add jar to isolated hive (metadataHive) class loader.

@SparkQA
Copy link

SparkQA commented Jun 18, 2015

Test build #35106 has finished for PR 6823 at commit d23e79e.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class Sqrt(child: Expression) extends UnaryMathExpression(math.sqrt, "SQRT")

@cloud-fan
Copy link
Contributor

LGTM

@rxin
Copy link
Contributor

rxin commented Jun 18, 2015

Thanks. Merging this.

@rxin
Copy link
Contributor

rxin commented Jun 18, 2015

Can you add the Python version for this?

@asfgit asfgit closed this in 3164112 Jun 18, 2015
nemccarthy pushed a commit to nemccarthy/spark that referenced this pull request Jun 19, 2015
JIRA: https://issues.apache.org/jira/browse/SPARK-8363

Author: Liang-Chi Hsieh <[email protected]>

Closes apache#6823 from viirya/move_sqrt and squashes the following commits:

8977e11 [Liang-Chi Hsieh] Remove unnecessary old tests.
d23e79e [Liang-Chi Hsieh] Explicitly indicate sqrt value sequence.
699f48b [Liang-Chi Hsieh] Use correct @SInCE tag.
8dff6d1 [Liang-Chi Hsieh] Merge remote-tracking branch 'upstream/master' into move_sqrt
bc2ed77 [Liang-Chi Hsieh] Remove/move arithmetic expression test and expression type checking test. Remove unnecessary Sqrt type rule.
d38492f [Liang-Chi Hsieh] Now sqrt accepts boolean because type casting is handled by HiveTypeCoercion.
297cc90 [Liang-Chi Hsieh] Sqrt only accepts double input.
ef4a21a [Liang-Chi Hsieh] Move sqrt to math.
@viirya viirya deleted the move_sqrt branch December 27, 2023 18:17
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.

4 participants