Skip to content

Conversation

@cloud-fan
Copy link
Contributor

Currently we auto alias expression in parser. However, during parser phase we don't have enough information to do the right alias. For example, Generator that has more than 1 kind of element need MultiAlias, ExtractValue don't need Alias if it's in middle of a ExtractValue chain.

@cloud-fan
Copy link
Contributor Author

The tests will fail as we need to fix the complex field order by issue first. See #5659

@cloud-fan
Copy link
Contributor Author

cc @marmbrus @rxin @chenghao-intel

@SparkQA
Copy link

SparkQA commented Jun 4, 2015

Test build #34193 has finished for PR 6647 at commit d471a90.

  • This patch fails Scala style tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class UnresolvedAlias(child: Expression) extends NamedExpression with trees.UnaryNode[Expression]
    • abstract class ExtractValueWithStruct extends ExtractValue

@SparkQA
Copy link

SparkQA commented Jun 5, 2015

Test build #34241 has finished for PR 6647 at commit 13a92da.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class UnresolvedAlias(child: Expression) extends NamedExpression
    • abstract class ExtractValueWithStruct extends ExtractValue

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exprs.map should be enough? We should just resolve the Alias for the root of a given expression tree, right?

@chenghao-intel
Copy link
Contributor

For DataFrame API, probably we'd better still keep the existed naming pattern, as we don't want to confusing the users when upgrade the spark.

@SparkQA
Copy link

SparkQA commented Jun 5, 2015

Test build #34268 has finished for PR 6647 at commit 9f8578e.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • class ElementwiseProduct(val scalingVec: Vector) extends VectorTransformer
    • trait TypeCheckResult
    • case class TypeCheckFailure(message: String) extends TypeCheckResult
    • case class UnresolvedAlias(child: Expression) extends NamedExpression
    • abstract class ExtractValueWithStruct extends ExtractValue
    • abstract class UnaryArithmetic extends UnaryExpression
    • case class UnaryMinus(child: Expression) extends UnaryArithmetic
    • case class Sqrt(child: Expression) extends UnaryArithmetic
    • case class Abs(child: Expression) extends UnaryArithmetic
    • case class BitwiseNot(child: Expression) extends UnaryArithmetic
    • case class MaxOf(left: Expression, right: Expression) extends BinaryArithmetic
    • case class MinOf(left: Expression, right: Expression) extends BinaryArithmetic
    • case class Atan2(left: Expression, right: Expression)
    • case class Hypot(left: Expression, right: Expression)
    • case class EqualTo(left: Expression, right: Expression) extends BinaryComparison

@SparkQA
Copy link

SparkQA commented Jun 6, 2015

Test build #34353 has finished for PR 6647 at commit 5dcf292.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class UnresolvedAlias(child: Expression) extends NamedExpression
    • abstract class ExtractValueWithStruct extends ExtractValue

@SparkQA
Copy link

SparkQA commented Jun 18, 2015

Test build #35138 has finished for PR 6647 at commit 02ed8a3.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class UnresolvedAlias(child: Expression) extends NamedExpression
    • abstract class ExtractValueWithStruct extends ExtractValue

@SparkQA
Copy link

SparkQA commented Jun 19, 2015

Test build #35226 has finished for PR 6647 at commit 6ac6c0e.

  • This patch fails MiMa tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class UnresolvedAlias(child: Expression) extends NamedExpression
    • abstract class ExtractValueWithStruct extends ExtractValue

@cloud-fan
Copy link
Contributor Author

retest this please.

@SparkQA
Copy link

SparkQA commented Jun 21, 2015

Test build #35386 has finished for PR 6647 at commit 6ac6c0e.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class UnresolvedAlias(child: Expression) extends NamedExpression
    • abstract class ExtractValueWithStruct extends ExtractValue

@SparkQA
Copy link

SparkQA commented Jun 21, 2015

Test build #35394 has finished for PR 6647 at commit 3acc43a.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class UnresolvedAlias(child: Expression) extends NamedExpression
    • abstract class ExtractValueWithStruct extends ExtractValue

@SparkQA
Copy link

SparkQA commented Jun 21, 2015

Test build #35399 has finished for PR 6647 at commit 73a90cb.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class UnresolvedAlias(child: Expression) extends NamedExpression
    • abstract class ExtractValueWithStruct extends ExtractValue

@SparkQA
Copy link

SparkQA commented Jun 21, 2015

Test build #35407 has finished for PR 6647 at commit 3a66e4b.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class UnresolvedAlias(child: Expression) extends NamedExpression
    • abstract class ExtractValueWithStruct extends ExtractValue

@SparkQA
Copy link

SparkQA commented Jun 21, 2015

Test build #35413 has finished for PR 6647 at commit 5b5786d.

  • This patch fails PySpark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class UnresolvedAlias(child: Expression) extends NamedExpression
    • abstract class ExtractValueWithStruct extends ExtractValue

@SparkQA
Copy link

SparkQA commented Jun 22, 2015

Test build #35424 has finished for PR 6647 at commit e2fb9e1.

  • This patch fails Python style tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class UnresolvedAlias(child: Expression) extends NamedExpression
    • abstract class ExtractValueWithStruct extends ExtractValue

@SparkQA
Copy link

SparkQA commented Jun 22, 2015

Test build #35432 has finished for PR 6647 at commit be5ee2d.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class UnresolvedAlias(child: Expression) extends NamedExpression
    • abstract class ExtractValueWithStruct extends ExtractValue

@SparkQA
Copy link

SparkQA commented Jun 22, 2015

Test build #35436 has finished for PR 6647 at commit d464641.

  • This patch fails PySpark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class UnresolvedAlias(child: Expression) extends NamedExpression
    • abstract class ExtractValueWithStruct extends ExtractValue

@SparkQA
Copy link

SparkQA commented Jun 22, 2015

Test build #35438 has finished for PR 6647 at commit a0a5401.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class UnresolvedAlias(child: Expression) extends NamedExpression
    • abstract class ExtractValueWithStruct extends ExtractValue

@SparkQA
Copy link

SparkQA commented Jun 22, 2015

Test build #35443 has finished for PR 6647 at commit b048f96.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class UnresolvedAlias(child: Expression) extends NamedExpression
    • abstract class ExtractValueWithStruct extends ExtractValue

@SparkQA
Copy link

SparkQA commented Jun 22, 2015

Test build #35449 has finished for PR 6647 at commit 552eba4.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class UnresolvedAlias(child: Expression) extends NamedExpression
    • abstract class ExtractValueWithStruct extends ExtractValue

@marmbrus
Copy link
Contributor

Thanks for cleaning this up. Merging to master!

@asfgit asfgit closed this in da7bbb9 Jun 22, 2015
animeshbaranawal pushed a commit to animeshbaranawal/spark that referenced this pull request Jun 25, 2015
Currently we auto alias expression in parser. However, during parser phase we don't have enough information to do the right alias. For example, Generator that has more than 1 kind of element need MultiAlias, ExtractValue don't need Alias if it's in middle of a ExtractValue chain.

Author: Wenchen Fan <[email protected]>

Closes apache#6647 from cloud-fan/alias and squashes the following commits:

552eba4 [Wenchen Fan] fix python
5b5786d [Wenchen Fan] fix agg
73a90cb [Wenchen Fan] fix case-preserve of ExtractValue
4cfd23c [Wenchen Fan] fix order by
d18f401 [Wenchen Fan] refine
9f07359 [Wenchen Fan] address comments
39c1aef [Wenchen Fan] small fix
33640ec [Wenchen Fan] auto alias expressions in analyzer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants