Bug: when column added with '+' for many times(>30) , the driver process hangs at org.apache.spark.sql.catalyst.expressions.BinaryArithmetic.dataType
Status: Resolved | Priority: Major | Resolution: Not A Problem
Created: 05/Sep/24 06:02
Affects Version/s: 3.4.1

spark-sql --master local[4] --total-executor-cores 1 --executor-cores 3 --executor-memory 4g 

spark-sql (default)>create table ztbtest(age int);
spark-sql (default)>insert into ztbtest values(1);

spark-sql (default)>select age+age+age+age+age+age+age+age+age+age+age+age+age+age+age+age+age+age+age+age+age+age+age+age+age+age+age+age+age+age+age+age+age+age+age+age+age+age+age+age  from ztbtest;  

 

 

jstack.log

"Thread-6" #17 prio=5 os_prio=0 tid=0x00007f1788012000 nid=0x13f93c runnable [0x00007f17a03f8000]
   java.lang.Thread.State: RUNNABLE
    at org.apache.spark.sql.catalyst.expressions.BinaryArithmetic.dataType(arithmetic.scala:236)
    at org.apache.spark.sql.catalyst.expressions.BinaryArithmetic.dataType(arithmetic.scala:239)
    at org.apache.spark.sql.catalyst.expressions.BinaryArithmetic.dataType(arithmetic.scala:239)
    at org.apache.spark.sql.catalyst.expressions.BinaryArithmetic.dataType(arithmetic.scala:239)
    at org.apache.spark.sql.catalyst.expressions.BinaryArithmetic.dataType(arithmetic.scala:239)
    at org.apache.spark.sql.catalyst.expressions.BinaryArithmetic.dataType(arithmetic.scala:236)
    at org.apache.spark.sql.catalyst.expressions.BinaryArithmetic.dataType(arithmetic.scala:239)
    at org.apache.spark.sql.catalyst.expressions.BinaryArithmetic.dataType(arithmetic.scala:236)
    at org.apache.spark.sql.catalyst.expressions.BinaryArithmetic.dataType(arithmetic.scala:239)
    at org.apache.spark.sql.catalyst.expressions.BinaryArithmetic.dataType(arithmetic.scala:239)
    at org.apache.spark.sql.catalyst.expressions.BinaryArithmetic.dataType(arithmetic.scala:236)
    at org.apache.spark.sql.catalyst.expressions.BinaryArithmetic.dataType(arithmetic.scala:236)
    at org.apache.spark.sql.catalyst.expressions.BinaryArithmetic.dataType(arithmetic.scala:239)
    at org.apache.spark.sql.catalyst.expressions.BinaryArithmetic.dataType(arithmetic.scala:236)
    at org.apache.spark.sql.catalyst.expressions.BinaryArithmetic.dataType(arithmetic.scala:236)
    at org.apache.spark.sql.catalyst.expressions.BinaryArithmetic.dataType(arithmetic.scala:236)
    at org.apache.spark.sql.catalyst.expressions.BinaryArithmetic.dataType(arithmetic.scala:239)
    at org.apache.spark.sql.catalyst.expressions.BinaryArithmetic.dataType(arithmetic.scala:236)
    at org.apache.spark.sql.catalyst.expressions.BinaryArithmetic.dataType(arithmetic.scala:239)
    at org.apache.spark.sql.catalyst.expressions.BinaryArithmetic.dataType(arithmetic.scala:236)
    at org.apache.spark.sql.catalyst.expressions.BinaryArithmetic.dataType(arithmetic.scala:236)
    at org.apache.spark.sql.catalyst.expressions.BinaryArithmetic.dataType(arithmetic.scala:236)
    at org.apache.spark.sql.catalyst.expressions.BinaryArithmetic.dataType(arithmetic.scala:239)
    at org.apache.spark.sql.catalyst.expressions.BinaryArithmetic.dataType(arithmetic.scala:236)
    at org.apache.spark.sql.catalyst.expressions.BinaryArithmetic.dataType(arithmetic.scala:236)
    at org.apache.spark.sql.catalyst.expressions.BinaryArithmetic.dataType(arithmetic.scala:236)
    at org.apache.spark.sql.catalyst.expressions.BinaryArithmetic.dataType(arithmetic.scala:239)
    at org.apache.spark.sql.catalyst.expressions.BinaryArithmetic.dataType(arithmetic.scala:239)
    at org.apache.spark.sql.catalyst.expressions.BinaryArithmetic.dataType(arithmetic.scala:236)
    at org.apache.spark.sql.catalyst.expressions.BinaryArithmetic.dataType(arithmetic.scala:239)
    at org.apache.spark.sql.catalyst.expressions.BinaryArithmetic.dataType(arithmetic.scala:239)
    at org.apache.spark.sql.catalyst.expressions.BinaryArithmetic.dataType(arithmetic.scala:239)

......