We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b6a190 commit db46241Copy full SHA for db46241
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala
@@ -726,7 +726,7 @@ class CodegenContext {
726
// be extremely expensive in certain cases, such as deeply-nested expressions which operate over
727
// inputs with wide schemas. For more details on the performance issues that motivated this
728
// flat, see SPARK-15680.
729
- if (SparkEnv.get.conf.getBoolean("spark.sql.codegen.comments", false)) {
+ if (SparkEnv.get != null && SparkEnv.get.conf.getBoolean("spark.sql.codegen.comments", false)) {
730
val name = freshName("c")
731
val comment = if (text.contains("\n") || text.contains("\r")) {
732
text.split("(\r\n)|\r|\n").mkString("/**\n * ", "\n * ", "\n */")
0 commit comments