Skip to content

Commit 3c6b25f

Browse files
Trying to reduce no-op changes wrt master
1 parent 31465d6 commit 3c6b25f

File tree

2 files changed

+3
-18
lines changed

2 files changed

+3
-18
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Row.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ class GenericMutableRow(size: Int) extends GenericRow(size) with MutableRow {
206206
override def copy() = new GenericRow(values.clone())
207207
}
208208

209+
209210
class RowOrdering(ordering: Seq[SortOrder]) extends Ordering[Row] {
210211
def this(ordering: Seq[SortOrder], inputSchema: Seq[Attribute]) =
211212
this(ordering.map(BindReferences.bindReference(_, inputSchema)))

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/LogicalPlan.scala

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ package org.apache.spark.sql.catalyst.plans.logical
2020
import org.apache.spark.sql.catalyst.errors.TreeNodeException
2121
import org.apache.spark.sql.catalyst.expressions._
2222
import org.apache.spark.sql.catalyst.plans.QueryPlan
23+
import org.apache.spark.sql.catalyst.types.StructType
2324
import org.apache.spark.sql.catalyst.trees
24-
import org.apache.spark.sql.catalyst.types._
2525

2626
abstract class LogicalPlan extends QueryPlan[LogicalPlan] {
2727
self: Product =>
@@ -54,11 +54,9 @@ abstract class LogicalPlan extends QueryPlan[LogicalPlan] {
5454
/**
5555
* Optionally resolves the given string to a
5656
* [[catalyst.expressions.NamedExpression NamedExpression]]. The attribute is expressed as
57-
* as string in the following form: `[scope].AttributeName.[nested].[fields]...`. Fields
58-
* can contain ordinal expressions, such as `field[i][j][k]...`.
57+
* as string in the following form: `[scope].AttributeName.[nested].[fields]...`.
5958
*/
6059
def resolve(name: String): Option[NamedExpression] = {
61-
// TODO: extend SqlParser to handle field expressions
6260
val parts = name.split("\\.")
6361
// Collect all attributes that are output by this nodes children where either the first part
6462
// matches the name or where the first part matches the scope and the second part matches the
@@ -69,20 +67,6 @@ abstract class LogicalPlan extends QueryPlan[LogicalPlan] {
6967
val remainingParts =
7068
if (option.qualifiers.contains(parts.head) && parts.size > 1) parts.drop(1) else parts
7169
if (option.name == remainingParts.head) (option, remainingParts.tail.toList) :: Nil else Nil
72-
// TODO from rebase!
73-
/*val remainingParts = if (option.qualifiers contains parts.head) parts.drop(1) else parts
74-
val relevantRemaining =
75-
if (remainingParts.head.matches("\\w*\\[(\\d+|\\w+)\\]")) { // array field name
76-
remainingParts.head.substring(0, remainingParts.head.indexOf("["))
77-
} else {
78-
remainingParts.head
79-
}
80-
if (option.name == relevantRemaining) (option, remainingParts.tail.toList) :: Nil else Nil*/
81-
// If the first part of the desired name matches a qualifier for this possible match, drop it.
82-
/* TODO: from rebase!
83-
val remainingParts = if (option.qualifiers contains parts.head) parts.drop(1) else parts
84-
if (option.name == remainingParts.head) (option, remainingParts.tail.toList) :: Nil else Nil
85-
*/
8670
}
8771

8872
options.distinct match {

0 commit comments

Comments
 (0)