Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2748,7 +2748,7 @@ class Analyzer(
object ResolveSQLFunctions extends Rule[LogicalPlan] {

private def hasSQLFunctionExpression(exprs: Seq[Expression]): Boolean = {
exprs.exists(_.find(_.isInstanceOf[SQLFunctionExpression]).nonEmpty)
exprs.exists(_.exists(_.isInstanceOf[SQLFunctionExpression]))
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ trait AliasHelper {
// Find all the aliased expressions in the aggregate list that don't include any actual
// AggregateExpression or PythonUDF, and create a map from the alias to the expression
val aliasMap = plan.aggregateExpressions.collect {
case a: Alias if a.child.find(_.isInstanceOf[AggregateExpression]).isEmpty =>
case a: Alias if !a.child.exists(_.isInstanceOf[AggregateExpression]) =>
(a.toAttribute, a)
}
AttributeMap(aliasMap)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ case class UnresolvedWindowExpression(

object WindowExpression {
def hasWindowExpression(e: Expression): Boolean = {
e.find(_.isInstanceOf[WindowExpression]).isDefined
e.exists(_.isInstanceOf[WindowExpression])
}

def expressionToIngnoreNulls(e: Expression, source: String): Boolean = e match {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ private[sql] object V2TableRefreshUtil extends SQLConfHelper with Logging {
}

private def containsCommand(plan: LogicalPlan): Boolean = {
plan.find(_.isInstanceOf[Command]).isDefined
plan.exists(_.isInstanceOf[Command])
}

private def validateTableIdentity(currentTable: Table, relation: DataSourceV2Relation): Unit = {
Expand Down