-
Notifications
You must be signed in to change notification settings - Fork 28.7k
[SPARK-22600][SQL][FOLLOW-UP] Fix a compilation error in TPCDS q75/q77 #19969
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
cc: @viirya @cloud-fan @kiszk |
Also, I feel we'd be better to check if all the tpcds queries can be properly compiled in tests like; |
hmm, didn't we already check it in tests? |
@@ -192,7 +192,7 @@ case class BroadcastHashJoinExec( | |||
| $value = ${ev.value}; | |||
|} | |||
""".stripMargin | |||
ExprCode(code, isNull, value) | |||
ExprCode(code, isNull, value, inputRow = matched) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to check more places that create ExprCode
outside of Expression.genCode
and see if we set the inputs correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ya, I'll look around.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked if the files below have the same issue though, I didn't found it (double-checks needed);
./catalyst/expressions/codegen/CodeGenerator.scala:202: ExprCode(code, "false", value)
./catalyst/expressions/codegen/ExpressionCodegen.scala:89: ExprCode(code = "", value = state.value, isNull = state.isNull)
./catalyst/expressions/codegen/GenerateMutableProjection.scala:90: val ev = ExprCode("", s"isNull_$i", s"value_$i")
./catalyst/expressions/codegen/GenerateSafeProjection.scala:77: ExprCode(code, "false", output)
./catalyst/expressions/codegen/GenerateSafeProjection.scala:107: ExprCode(code, "false", output)
./catalyst/expressions/codegen/GenerateSafeProjection.scala:128: ExprCode(code, "false", output)
./catalyst/expressions/codegen/GenerateSafeProjection.scala:140: case _ => ExprCode("", "false", input)
./catalyst/expressions/codegen/GenerateUnsafeProjection.scala:55: ExprCode("", s"$tmpInput.isNullAt($i)", ctx.getValue(tmpInput, dt, i.toString))
./catalyst/expressions/codegen/GenerateUnsafeProjection.scala:353: ExprCode(code, "false", result)
./catalyst/expressions/complexTypeCreator.scala:397: ExprCode(code = eval.code, isNull = "false", value = eval.value)
./catalyst/expressions/datetimeExpressions.scala:677: ExprCode("", "true", ctx.defaultValue(dataType))
./catalyst/expressions/datetimeExpressions.scala:812: ExprCode("", "true", "(UTF8String) null")
./catalyst/expressions/Expression.scala:103: ExprCode(ctx.registerComment(this.toString), subExprState.isNull, subExprState.value)
./catalyst/expressions/Expression.scala:107: val eval = doGenCode(ctx, ExprCode("", isNull, value))
./catalyst/expressions/misc.scala:85: ExprCode(code = s"""${eval.code}
./catalyst/expressions/nullExpressions.scala:325: ExprCode(code = eval.code, isNull = "false", value = eval.isNull)
./catalyst/expressions/nullExpressions.scala:351: ExprCode(code = eval.code, isNull = "false", value = s"(!(${eval.isNull}))")
./catalyst/expressions/objects/objects.scala:448: ExprCode(code = "", value = value, isNull = if (nullable) isNull else "false")
./execution/aggregate/HashAggregateExec.scala:200: ExprCode(ev.code + initVars, isNull, value)
./execution/aggregate/HashMapGenerator.scala:59: ExprCode(ev.code + initVars, isNull, value)
./execution/basicPhysicalOperators.scala:372: val ev = ExprCode("", "false", value)
./execution/ColumnarBatchScan.scala:62: ExprCode(code, isNullVar, valueVar)
./execution/ExpandExec.scala:159: ExprCode(code, isNull, value)
./execution/GenerateExec.scala:172: Seq(ExprCode("", s"$index == -1", index))
./execution/GenerateExec.scala:174: Seq(ExprCode("", "false", index))
./execution/GenerateExec.scala:317: ExprCode(code, isNull, value)
./execution/GenerateExec.scala:319: ExprCode(s"$javaType $value = $getter;", "false", value)
./execution/joins/BroadcastHashJoinExec.scala:195: ExprCode(code, isNull, value, inputRow = matched)
./execution/joins/BroadcastHashJoinExec.scala:490: val resultVar = input ++ Seq(ExprCode("", "false", existsVar))
./execution/joins/SortMergeJoinExec.scala:535: (ExprCode(code, isNull, value), leftVarsDecl)
./execution/joins/SortMergeJoinExec.scala:539: (ExprCode(code, "false", value), leftVarsDecl)
./execution/WholeStageCodegenExec.scala:130: ExprCode("", "false", row)
./execution/WholeStageCodegenExec.scala:145: ExprCode(code, "false", ev.value)
./execution/WholeStageCodegenExec.scala:148: ExprCode("", "false", "unsafeRow")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except for L195, BroadcastHashJoinExec
is safe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've double-checked the above list. I think they are safe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
|
If no problem, I'll include the changes for additional tests in this pr. |
Test build #84870 has finished for PR 19969 at commit
|
How about q77? |
See the result of #19971 |
ya, this pr also fixes |
@maropu Thanks for finding and fixing this. I'll look into the possible places later (just gets up). |
I am still worrying about the original PR #19813. We also need a conf to turn that off. |
LGTM merged to master. |
What changes were proposed in this pull request?
This pr fixed a compilation error of TPCDS
q75
/q77
caused by #19813;How was this patch tested?
Manually checked
q75
/q77
can be properly compiled