Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/14672#discussion_r75250012
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/SubstituteUnresolvedOrdinals.scala
---
@@ -27,22 +27,21 @@ import
org.apache.spark.sql.catalyst.trees.CurrentOrigin.withOrigin
/**
* Replaces ordinal in 'order by' or 'group by' with UnresolvedOrdinal
expression.
*/
-class UnresolvedOrdinalSubstitution(conf: CatalystConf) extends
Rule[LogicalPlan] {
- private def isIntegerLiteral(sorter: Expression) =
IntegerIndex.unapply(sorter).nonEmpty
+class SubstituteUnresolvedOrdinals(conf: CatalystConf) extends
Rule[LogicalPlan] {
+ private def isIntLiteral(sorter: Expression) =
IntegerIndex.unapply(sorter).nonEmpty
--- End diff --
as we are cleaning up the code, shall we also remove `IntegerIndex`? It
became unnecessary after we make `-1` a literal instead of `UnaryMinus`.
---
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]