You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This test failed in my PR when I triggered the databricks CI: #5531
10:54:26 _________________________ test_cast_neg_to_decimal_err _________________________
10:54:26 [gw0] linux -- Python 3.8.13 /databricks/conda/envs/cudf-udf/bin/python
10:54:26
10:54:26 def test_cast_neg_to_decimal_err():
10:54:26 # -12 cannot be represented as decimal(7,7)
10:54:26 data_gen = _decimal_gen_7_7
10:54:26 exception_content = "Decimal(compact,-120000000,20,0}) cannot be represented as Decimal(7, 7)"
10:54:26 exception_str = "java.lang.ArithmeticException: " + exception_content if is_before_spark_330() else \
10:54:26 "org.apache.spark.SparkArithmeticException: " + exception_content
10:54:26
10:54:26 > assert_gpu_and_cpu_error(
10:54:26 lambda spark : unary_op_df(spark, data_gen).selectExpr(
10:54:26 'cast(-12 as {})'.format(to_cast_string(data_gen.data_type))).collect(),
10:54:26 ansi_enabled_conf,
10:54:26 exception_str)
10:54:26
10:54:26 ../../src/main/python/arithmetic_ops_test.py:304:
10:54:26 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
10:54:26 ../../src/main/python/asserts.py:572: in assert_gpu_and_cpu_error
10:54:26 assert_py4j_exception(lambda: with_cpu_session(df_fun, conf), error_message)
10:54:26 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
10:54:26
10:54:26 func = <function assert_gpu_and_cpu_error.<locals>.<lambda> at 0x7f28ab314dc0>
10:54:26 error_message = 'java.lang.ArithmeticException: Decimal(compact,-120000000,20,0}) cannot be represented as Decimal(7, 7)'
10:54:26
10:54:26 def assert_py4j_exception(func, error_message):
10:54:26 """
10:54:26 Assert that a specific Java exception is thrown
10:54:26 :param func: a function to be verified
10:54:26 :param error_message: a string such as the one produce by java.lang.Exception.toString
10:54:26 :return: Assertion failure if no exception matching error_message has occurred.
10:54:26 """
10:54:26 with pytest.raises(Py4JJavaError) as py4jError:
10:54:26 func()
10:54:26 > assert error_message in str(py4jError.value.java_exception)
10:54:26 E AssertionError
10:54:26
10:54:26 ../../src/main/python/asserts.py:561: AssertionError
10:54:26 ----------------------------- Captured stderr call -----------------------------
10:54:26 22/05/20 14:33:20 WARN SQLExecution: Error executing delta metering
10:54:26 org.apache.spark.SparkArithmeticException: Decimal(compact,-120000000,20,0}) cannot be represented as Decimal(7, 7). If necessary set spark.sql.ansi.enabled to false to bypass this error.
10:54:26 at org.apache.spark.sql.errors.QueryExecutionErrors$.cannotChangeDecimalPrecisionError(QueryExecutionErrors.scala:110)
10:54:26 at org.apache.spark.sql.catalyst.expressions.CastBase.changePrecision(Cast.scala:816)
10:54:26 at org.apache.spark.sql.catalyst.expressions.CastBase.$anonfun$castToDecimal$12(Cast.scala:849)
10:54:26 at org.apache.spark.sql.catalyst.expressions.CastBase.nullSafeEval(Cast.scala:995)
10:54:26 at org.apache.spark.sql.catalyst.expressions.UnaryExpression.eval(Expression.scala:625)
10:54:26 at org.apache.spark.sql.catalyst.optimizer.ConstantFolding$$anonfun$apply$1$$anonfun$applyOrElse$1.applyOrElse(expressions.scala:103)
10:54:26 at org.apache.spark.sql.catalyst.optimizer.ConstantFolding$$anonfun$apply$1$$anonfun$applyOrElse$1.applyOrElse(expressions.scala:69)
10:54:26 at org.apache.spark.sql.catalyst.trees.TreeNode.$anonfun$transformDownWithPruning$1(TreeNode.scala:575)
10:54:26 at org.apache.spark.sql.catalyst.trees.CurrentOrigin$.withOrigin(TreeNode.scala:167)
10:54:26 at org.apache.spark.sql.catalyst.trees.TreeNode.transformDownWithPruning(TreeNode.scala:575)
10:54:26 at org.apache.spark.sql.catalyst.trees.TreeNode.$anonfun$transformDownWithPruning$3(TreeNode.scala:580)
10:54:26 at org.apache.spark.sql.catalyst.trees.UnaryLike.mapChildren(TreeNode.scala:1226)
10:54:26 at org.apache.spark.sql.catalyst.trees.UnaryLike.mapChildren$(TreeNode.scala:1225)
10:54:26 at org.apache.spark.sql.catalyst.expressions.UnaryExpression.mapChildren(Expression.scala:607)
10:54:26 at org.apache.spark.sql.catalyst.trees.TreeNode.transformDownWithPruning(TreeNode.scala:580)
10:54:26 at org.apache.spark.sql.catalyst.plans.QueryPlan.$anonfun$transformExpressionsDownWithPruning$1(QueryPlan.scala:161)
10:54:26 at org.apache.spark.sql.catalyst.plans.QueryPlan.$anonfun$mapExpressions$1(QueryPlan.scala:202)
10:54:26 at org.apache.spark.sql.catalyst.trees.CurrentOrigin$.withOrigin(TreeNode.scala:167)
10:54:26 at org.apache.spark.sql.catalyst.plans.QueryPlan.transformExpression$1(QueryPlan.scala:202)
10:54:26 at org.apache.spark.sql.catalyst.plans.QueryPlan.recursiveTransform$1(QueryPlan.scala:213)
10:54:26 at org.apache.spark.sql.catalyst.plans.QueryPlan.$anonfun$mapExpressions$3(QueryPlan.scala:218)
10:54:26 at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:286)
10:54:26 at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:62)
10:54:26 at scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:55)
10:54:26 at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:49)
10:54:26 at scala.collection.TraversableLike.map(TraversableLike.scala:286)
10:54:26 at scala.collection.TraversableLike.map$(TraversableLike.scala:279)
10:54:26 at scala.collection.AbstractTraversable.map(Traversable.scala:108)
10:54:26 at org.apache.spark.sql.catalyst.plans.QueryPlan.recursiveTransform$1(QueryPlan.scala:218)
10:54:26 at org.apache.spark.sql.catalyst.plans.QueryPlan.$anonfun$mapExpressions$4(QueryPlan.scala:223)
10:54:26 at org.apache.spark.sql.catalyst.trees.TreeNode.mapProductIterator(TreeNode.scala:418)
10:54:26 at org.apache.spark.sql.catalyst.plans.QueryPlan.mapExpressions(QueryPlan.scala:223)
10:54:26 at org.apache.spark.sql.catalyst.plans.QueryPlan.transformExpressionsDownWithPruning(QueryPlan.scala:161)
10:54:26 at org.apache.spark.sql.catalyst.optimizer.ConstantFolding$$anonfun$apply$1.applyOrElse(expressions.scala:69)
10:54:26 at org.apache.spark.sql.catalyst.optimizer.ConstantFolding$$anonfun$apply$1.applyOrElse(expressions.scala:67)
10:54:26 at org.apache.spark.sql.catalyst.trees.TreeNode.$anonfun$transformDownWithPruning$1(TreeNode.scala:575)
10:54:26 at org.apache.spark.sql.catalyst.trees.CurrentOrigin$.withOrigin(TreeNode.scala:167)
10:54:26 at org.apache.spark.sql.catalyst.trees.TreeNode.transformDownWithPruning(TreeNode.scala:575)
10:54:26 at org.apache.spark.sql.catalyst.plans.logical.LogicalPlan.org$apache$spark$sql$catalyst$plans$logical$AnalysisHelper$$super$transformDownWithPruning(LogicalPlan.scala:30)
10:54:26 at org.apache.spark.sql.catalyst.plans.logical.AnalysisHelper.transformDownWithPruning(AnalysisHelper.scala:268)
10:54:26 at org.apache.spark.sql.catalyst.plans.logical.AnalysisHelper.transformDownWithPruning$(AnalysisHelper.scala:264)
10:54:26 at org.apache.spark.sql.catalyst.plans.logical.LogicalPlan.transformDownWithPruning(LogicalPlan.scala:30)
10:54:26 at org.apache.spark.sql.catalyst.plans.logical.LogicalPlan.transformDownWithPruning(LogicalPlan.scala:30)
10:54:26 at org.apache.spark.sql.catalyst.trees.TreeNode.transformWithPruning(TreeNode.scala:541)
10:54:26 at org.apache.spark.sql.catalyst.optimizer.ConstantFolding$.apply(expressions.scala:67)
10:54:26 at org.apache.spark.sql.catalyst.optimizer.ConstantFolding$.apply(expressions.scala:49)
10:54:26 at org.apache.spark.sql.catalyst.rules.RuleExecutor.$anonfun$execute$3(RuleExecutor.scala:216)
10:54:26 at com.databricks.spark.util.FrameProfiler$.record(FrameProfiler.scala:80)
10:54:26 at org.apache.spark.sql.catalyst.rules.RuleExecutor.$anonfun$execute$2(RuleExecutor.scala:216)
10:54:26 at scala.collection.LinearSeqOptimized.foldLeft(LinearSeqOptimized.scala:126)
10:54:26 at scala.collection.LinearSeqOptimized.foldLeft$(LinearSeqOptimized.scala:122)
10:54:26 at scala.collection.immutable.List.foldLeft(List.scala:91)
10:54:26 at org.apache.spark.sql.catalyst.rules.RuleExecutor.$anonfun$execute$1(RuleExecutor.scala:213)
10:54:26 at org.apache.spark.sql.catalyst.rules.RuleExecutor.$anonfun$execute$1$adapted(RuleExecutor.scala:205)
10:54:26 at scala.collection.immutable.List.foreach(List.scala:431)
10:54:26 at org.apache.spark.sql.catalyst.rules.RuleExecutor.execute(RuleExecutor.scala:205)
10:54:26 at org.apache.spark.sql.catalyst.rules.RuleExecutor.$anonfun$executeAndTrack$1(RuleExecutor.scala:184)
10:54:26 at org.apache.spark.sql.catalyst.QueryPlanningTracker$.withTracker(QueryPlanningTracker.scala:126)
10:54:26 at org.apache.spark.sql.catalyst.rules.RuleExecutor.executeAndTrack(RuleExecutor.scala:184)
10:54:26 at org.apache.spark.sql.execution.QueryExecution.$anonfun$optimizedPlan$1(QueryExecution.scala:196)
10:54:26 at com.databricks.spark.util.FrameProfiler$.record(FrameProfiler.scala:80)
10:54:26 at org.apache.spark.sql.catalyst.QueryPlanningTracker.measurePhase(QueryPlanningTracker.scala:151)
10:54:26 at org.apache.spark.sql.execution.QueryExecution.$anonfun$executePhase$1(QueryExecution.scala:265)
10:54:26 at org.apache.spark.sql.SparkSession.withActive(SparkSession.scala:958)
10:54:26 at org.apache.spark.sql.execution.QueryExecution.executePhase(QueryExecution.scala:265)
10:54:26 at org.apache.spark.sql.execution.QueryExecution.optimizedPlan$lzycompute(QueryExecution.scala:192)
10:54:26 at org.apache.spark.sql.execution.QueryExecution.optimizedPlan(QueryExecution.scala:188)
10:54:26 at org.apache.spark.sql.execution.QueryExecution.assertOptimized(QueryExecution.scala:206)
10:54:26 at org.apache.spark.sql.execution.QueryExecution.executedPlan$lzycompute(QueryExecution.scala:225)
10:54:26 at org.apache.spark.sql.execution.QueryExecution.executedPlan(QueryExecution.scala:222)
10:54:26 at com.databricks.sql.transaction.tahoe.metering.DeltaMetering$.reportUsage(DeltaMetering.scala:136)
10:54:26 at org.apache.spark.sql.execution.SQLExecution$.$anonfun$withCustomExecutionEnv$8(SQLExecution.scala:277)
10:54:26 at org.apache.spark.sql.execution.SQLExecution$.withSQLConfPropagated(SQLExecution.scala:360)
10:54:26 at org.apache.spark.sql.execution.SQLExecution$.$anonfun$withCustomExecutionEnv$1(SQLExecution.scala:160)
10:54:26 at org.apache.spark.sql.SparkSession.withActive(SparkSession.scala:958)
10:54:26 at org.apache.spark.sql.execution.SQLExecution$.withCustomExecutionEnv(SQLExecution.scala:115)
10:54:26 at org.apache.spark.sql.execution.SQLExecution$.withNewExecutionId(SQLExecution.scala:310)
10:54:26 at org.apache.spark.sql.Dataset.withAction(Dataset.scala:3928)
10:54:26 at org.apache.spark.sql.Dataset.collectToPython(Dataset.scala:3716)
10:54:26 at sun.reflect.GeneratedMethodAccessor128.invoke(Unknown Source)
10:54:26 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
10:54:26 at java.lang.reflect.Method.invoke(Method.java:498)
10:54:26 at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)
10:54:26 at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:380)
10:54:26 at py4j.Gateway.invoke(Gateway.java:295)
10:54:26 at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
10:54:26 at py4j.commands.CallCommand.execute(CallCommand.java:79)
10:54:26 at py4j.ClientServerConnection.waitForCommands(ClientServerConnection.java:195)
10:54:26 at py4j.ClientServerConnection.run(ClientServerConnection.java:115)
10:54:26 at java.lang.Thread.run(Thread.java:748)
The text was updated successfully, but these errors were encountered:
This test failed in my PR when I triggered the databricks CI: #5531
The text was updated successfully, but these errors were encountered: