Skip to content

Commit 6f91656

Browse files
committed
add comment.
1 parent f4ef207 commit 6f91656

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ExpressionEvalHelper.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,11 @@ trait ExpressionEvalHelper extends GeneratorDrivenPropertyChecks {
304304
* Private helper function for comparing two values using relative tolerance.
305305
* Note that if x or y is extremely close to zero, i.e., smaller than Double.MinPositiveValue,
306306
* the relative tolerance is meaningless, so the exception will be raised to warn users.
307+
*
308+
* TODO: this duplicates functions in spark.ml.util.TestingUtils.relTol and
309+
* spark.mllib.util.TestingUtils.relTol, they could be moved to common utils sub module for the
310+
* whole spark project which does not depend on other modules. See more detail in discussion:
311+
* https://github.com/apache/spark/pull/15059#issuecomment-246940444
307312
*/
308313
private def relativeErrorComparison(x: Double, y: Double, eps: Double = 1E-8): Boolean = {
309314
val absX = math.abs(x)

0 commit comments

Comments
 (0)