Skip to content

Commit 278ec8a

Browse files
committed
More minor scaladoc cleanup for Spark SQL.
Author: Reynold Xin <[email protected]> Closes apache#1142 from rxin/sqlclean and squashes the following commits: 67a789e [Reynold Xin] More minor scaladoc cleanup for Spark SQL.
1 parent e551479 commit 278ec8a

File tree

3 files changed

+21
-23
lines changed

3 files changed

+21
-23
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/HiveTypeCoercion.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ object HiveTypeCoercion {
3333
}
3434

3535
/**
36-
* A collection of [[catalyst.rules.Rule Rules]] that can be used to coerce differing types that
36+
* A collection of [[Rule Rules]] that can be used to coerce differing types that
3737
* participate in operations into compatible ones. Most of these rules are based on Hive semantics,
3838
* but they do not introduce any dependencies on the hive codebase. For this reason they remain in
3939
* Catalyst until we have a more standard set of coercions.
@@ -53,8 +53,8 @@ trait HiveTypeCoercion {
5353
Nil
5454

5555
/**
56-
* Applies any changes to [[catalyst.expressions.AttributeReference AttributeReference]] data
57-
* types that are made by other rules to instances higher in the query tree.
56+
* Applies any changes to [[AttributeReference]] data types that are made by other rules to
57+
* instances higher in the query tree.
5858
*/
5959
object PropagateTypes extends Rule[LogicalPlan] {
6060
def apply(plan: LogicalPlan): LogicalPlan = plan transform {
@@ -244,7 +244,7 @@ trait HiveTypeCoercion {
244244
}
245245

246246
/**
247-
* Casts to/from [[catalyst.types.BooleanType BooleanType]] are transformed into comparisons since
247+
* Casts to/from [[BooleanType]] are transformed into comparisons since
248248
* the JVM does not consider Booleans to be numeric types.
249249
*/
250250
object BooleanCasts extends Rule[LogicalPlan] {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ case class Alias(child: Expression, name: String)
103103
* A reference to an attribute produced by another operator in the tree.
104104
*
105105
* @param name The name of this attribute, should only be used during analysis or for debugging.
106-
* @param dataType The [[types.DataType DataType]] of this attribute.
106+
* @param dataType The [[DataType]] of this attribute.
107107
* @param nullable True if null is a valid value for this attribute.
108108
* @param exprId A globally unique id used to check if different AttributeReferences refer to the
109109
* same attribute.

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,13 @@ object ColumnPruning extends Rule[LogicalPlan] {
9595
Project(substitutedProjection, child)
9696

9797
// Eliminate no-op Projects
98-
case Project(projectList, child) if(child.output == projectList) => child
98+
case Project(projectList, child) if child.output == projectList => child
9999
}
100100
}
101101

102102
/**
103-
* Replaces [[catalyst.expressions.Expression Expressions]] that can be statically evaluated with
104-
* equivalent [[catalyst.expressions.Literal Literal]] values. This rule is more specific with
103+
* Replaces [[Expression Expressions]] that can be statically evaluated with
104+
* equivalent [[Literal]] values. This rule is more specific with
105105
* Null value propagation from bottom to top of the expression tree.
106106
*/
107107
object NullPropagation extends Rule[LogicalPlan] {
@@ -110,8 +110,8 @@ object NullPropagation extends Rule[LogicalPlan] {
110110
case e @ Count(Literal(null, _)) => Cast(Literal(0L), e.dataType)
111111
case e @ Sum(Literal(c, _)) if c == 0 => Cast(Literal(0L), e.dataType)
112112
case e @ Average(Literal(c, _)) if c == 0 => Literal(0.0, e.dataType)
113-
case e @ IsNull(c) if c.nullable == false => Literal(false, BooleanType)
114-
case e @ IsNotNull(c) if c.nullable == false => Literal(true, BooleanType)
113+
case e @ IsNull(c) if !c.nullable => Literal(false, BooleanType)
114+
case e @ IsNotNull(c) if !c.nullable => Literal(true, BooleanType)
115115
case e @ GetItem(Literal(null, _), _) => Literal(null, e.dataType)
116116
case e @ GetItem(_, Literal(null, _)) => Literal(null, e.dataType)
117117
case e @ GetField(Literal(null, _), _) => Literal(null, e.dataType)
@@ -154,8 +154,8 @@ object NullPropagation extends Rule[LogicalPlan] {
154154
}
155155

156156
/**
157-
* Replaces [[catalyst.expressions.Expression Expressions]] that can be statically evaluated with
158-
* equivalent [[catalyst.expressions.Literal Literal]] values.
157+
* Replaces [[Expression Expressions]] that can be statically evaluated with
158+
* equivalent [[Literal]] values.
159159
*/
160160
object ConstantFolding extends Rule[LogicalPlan] {
161161
def apply(plan: LogicalPlan): LogicalPlan = plan transform {
@@ -197,7 +197,7 @@ object BooleanSimplification extends Rule[LogicalPlan] {
197197
}
198198

199199
/**
200-
* Combines two adjacent [[catalyst.plans.logical.Filter Filter]] operators into one, merging the
200+
* Combines two adjacent [[Filter]] operators into one, merging the
201201
* conditions into one conjunctive predicate.
202202
*/
203203
object CombineFilters extends Rule[LogicalPlan] {
@@ -223,9 +223,8 @@ object SimplifyFilters extends Rule[LogicalPlan] {
223223
}
224224

225225
/**
226-
* Pushes [[catalyst.plans.logical.Filter Filter]] operators through
227-
* [[catalyst.plans.logical.Project Project]] operators, in-lining any
228-
* [[catalyst.expressions.Alias Aliases]] that were defined in the projection.
226+
* Pushes [[Filter]] operators through [[Project]] operators, in-lining any [[Alias Aliases]]
227+
* that were defined in the projection.
229228
*
230229
* This heuristic is valid assuming the expression evaluation cost is minimal.
231230
*/
@@ -248,10 +247,10 @@ object PushPredicateThroughProject extends Rule[LogicalPlan] {
248247
}
249248

250249
/**
251-
* Pushes down [[catalyst.plans.logical.Filter Filter]] operators where the `condition` can be
250+
* Pushes down [[Filter]] operators where the `condition` can be
252251
* evaluated using only the attributes of the left or right side of a join. Other
253-
* [[catalyst.plans.logical.Filter Filter]] conditions are moved into the `condition` of the
254-
* [[catalyst.plans.logical.Join Join]].
252+
* [[Filter]] conditions are moved into the `condition` of the [[Join]].
253+
*
255254
* And also Pushes down the join filter, where the `condition` can be evaluated using only the
256255
* attributes of the left or right side of sub query when applicable.
257256
*
@@ -345,8 +344,7 @@ object PushPredicateThroughJoin extends Rule[LogicalPlan] with PredicateHelper {
345344
}
346345

347346
/**
348-
* Removes [[catalyst.expressions.Cast Casts]] that are unnecessary because the input is already
349-
* the correct type.
347+
* Removes [[Cast Casts]] that are unnecessary because the input is already the correct type.
350348
*/
351349
object SimplifyCasts extends Rule[LogicalPlan] {
352350
def apply(plan: LogicalPlan): LogicalPlan = plan transformAllExpressions {
@@ -355,7 +353,7 @@ object SimplifyCasts extends Rule[LogicalPlan] {
355353
}
356354

357355
/**
358-
* Combines two adjacent [[catalyst.plans.logical.Limit Limit]] operators into one, merging the
356+
* Combines two adjacent [[Limit]] operators into one, merging the
359357
* expressions into one single expression.
360358
*/
361359
object CombineLimits extends Rule[LogicalPlan] {
@@ -366,7 +364,7 @@ object CombineLimits extends Rule[LogicalPlan] {
366364
}
367365

368366
/**
369-
* Removes the inner [[catalyst.expressions.CaseConversionExpression]] that are unnecessary because
367+
* Removes the inner [[CaseConversionExpression]] that are unnecessary because
370368
* the inner conversion is overwritten by the outer one.
371369
*/
372370
object SimplifyCaseConversionExpressions extends Rule[LogicalPlan] {

0 commit comments

Comments
 (0)