Github user sarutak commented on a diff in the pull request:
https://github.com/apache/spark/pull/11301#discussion_r54689900
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/WholeStageCodegen.scala
---
@@ -284,7 +284,14 @@ case class WholeStageCodegen(plan: CodegenSupport,
children: Seq[SparkPlan])
${ctx.declareAddedFunctions()}
protected void processNext() throws java.io.IOException {
- ${code.trim}
+ try {
+ ${code.trim}
+ } catch (final Throwable e) {
+ org.slf4j.Logger logger =
org.slf4j.LoggerFactory.getLogger(this.getClass());
+ logger.error("The method processNext() is generated for " +
+ "${plan.origin.callSite.getOrElse("unknown")}");
+ throw e;
+ }
--- End diff --
Hmm... Are there any case when generated expressions throw
checked-exception?
In addition, Spark uses `Logging` class for logging so can we use it
somehow?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]