Github user marmbrus commented on a diff in the pull request:
https://github.com/apache/spark/pull/360#discussion_r11932023
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/LogicalPlan.scala
---
@@ -54,9 +54,57 @@ abstract class LogicalPlan extends
QueryPlan[LogicalPlan] {
/**
* Optionally resolves the given string to a
* [[catalyst.expressions.NamedExpression NamedExpression]]. The
attribute is expressed as
- * as string in the following form:
`[scope].AttributeName.[nested].[fields]...`.
+ * as string in the following form:
`[scope].AttributeName.[nested].[fields]...`. Fields
+ * can contain ordinal expressions, such as `field[i][j][k]...`.
*/
def resolve(name: String): Option[NamedExpression] = {
+ def expandFunc(expType: (Expression, DataType), field: String):
(Expression, DataType) = {
--- End diff --
What do you think of #518 instead of changing the resolver? I am not a
parser expert, but I think this is closer to the way hive (and probably optiq
which we hope to use eventually) work.
---
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.
---