Skip to content

Conversation

@sarutak
Copy link
Member

@sarutak sarutak commented Nov 24, 2014

The standard SQL defines || as a concatenation operator.
The operator makes concatenated string from 2 operands.

@SparkQA
Copy link

SparkQA commented Nov 24, 2014

Test build #23794 has finished for PR 3433 at commit f4bbec3.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Nov 24, 2014

Test build #23795 has finished for PR 3433 at commit 0e5062c.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Nov 24, 2014

Test build #23797 has finished for PR 3433 at commit 5437d49.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Dec 1, 2014

Test build #23960 has finished for PR 3433 at commit 66df576.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class Concat(left: Expression, right: Expression) extends BinaryExpression

Copy link
Contributor

Choose a reason for hiding this comment

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

Is this the right place to add this given the precedence of the operator?

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually, I found the precedence of the operator is different depends on the implementation of RDBMS. The precedence of this operator in this PR is similar to PostgreSQL's implementation.

Copy link
Contributor

Choose a reason for hiding this comment

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

NIT: add a space after {.

Copy link
Member Author

Choose a reason for hiding this comment

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

@liancheng Thanks for your comment. I've done.

@SparkQA
Copy link

SparkQA commented Dec 10, 2014

Test build #24278 has finished for PR 3433 at commit 8b162ec.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is automatically defined by BinaryExpression.

@marmbrus
Copy link
Contributor

One minor style comment. Also, does Hive support this? If so we should add it to HiveQl.scala as well. Otherwise this LGTM

@sarutak
Copy link
Member Author

sarutak commented Dec 18, 2014

Thanks @marmbrus .
In Hive, || is assigned as Logical OR operator and Hive has concat function instead of || so I don't think we need change for HiveQL.scala.

@SparkQA
Copy link

SparkQA commented Dec 18, 2014

Test build #24565 has finished for PR 3433 at commit 372d665.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class Concat(left: Expression, right: Expression) extends BinaryExpression
    • class HiveThriftServer2Listener(val server: HiveServer2) extends SparkListener

@SparkQA
Copy link

SparkQA commented Dec 24, 2014

Test build #24749 has finished for PR 3433 at commit 85469b4.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class Concat(left: Expression, right: Expression) extends BinaryExpression

@SparkQA
Copy link

SparkQA commented Dec 26, 2014

Test build #24836 has finished for PR 3433 at commit 9b94d48.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class Concat(left: Expression, right: Expression) extends BinaryExpression

@SparkQA
Copy link

SparkQA commented Dec 30, 2014

Test build #24896 has finished for PR 3433 at commit 6b47555.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class Concat(left: Expression, right: Expression) extends BinaryExpression

@marmbrus
Copy link
Contributor

Hmm, okay. It might be a little confusing to users if in one version it does concatenation and in the other it is an OR. My other concern here is that the new concatenation operator is implicitly doing casting internally instead of actually casting its arguments to String. While this might be the same now, I'll break if we ever have special string casts. Perhaps this feature should be blocked on: SPARK-4867?

@sarutak
Copy link
Member Author

sarutak commented Jan 8, 2015

Ah, exactly it can confusing users. So how about adding CONCAT function? If we do that, SPARK-4867 can blocks this PR.

@marmbrus
Copy link
Contributor

Yeah, agreed. Lets block this on SPARK-4867, but once that is fixed I'd love to have a native concat function.

@marmbrus
Copy link
Contributor

For now though I propose we close this issue.

@sarutak
Copy link
Member Author

sarutak commented Jan 10, 2015

O.K, closing this PR.

@sarutak sarutak closed this Jan 10, 2015
@sarutak sarutak deleted the concat-feature branch April 11, 2015 05:24
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