davidm-db commented on code in PR #48950:
URL: https://github.com/apache/spark/pull/48950#discussion_r1868328519
##########
sql/core/src/main/scala/org/apache/spark/sql/scripting/SqlScriptingExecutionNode.scala:
##########
@@ -77,7 +79,7 @@ trait NonLeafStatementExec extends CompoundStatementExec {
// DataFrame evaluates to True if it is single row, single column
// of boolean type with value True.
- val df = Dataset.ofRows(session, statement.parsedPlan)
+ val df = statement.buildDataFrame(session)
df.schema.fields match {
case Array(field) if field.dataType == BooleanType =>
df.limit(2).collect() match {
Review Comment:
@miland-db Should we have exception handling here (when executing the
condition) as well?
Or maybe wrap `getNextStatement` in SSE with exception handling?
Did we think about how are we going to include the line number in the
exceptions when they are not handled, but thrown?
Let's discuss this tomorrow, I'm writing now so I don't forget.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]