Skip to content

Conversation

@zhichao-li
Copy link
Contributor

No description provided.

@zhichao-li
Copy link
Contributor Author

cc @chenghao-intel @adrian-wang

@AmplabJenkins
Copy link

Merged build triggered.

@AmplabJenkins
Copy link

Merged build started.

Copy link
Contributor

Choose a reason for hiding this comment

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

you can construct an seq and use contains()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

almost the same thing for the performance point the view? any way it might be more concise by using seq.

@SparkQA
Copy link

SparkQA commented Jun 26, 2015

Test build #35840 has started for PR 7035 at commit 6bdd7f1.

@SparkQA
Copy link

SparkQA commented Jun 26, 2015

Test build #35840 has finished for PR 7035 at commit 6bdd7f1.

  • This patch fails PySpark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class ShiftRightUnsigned(left: Expression, right: Expression) extends Expression

@AmplabJenkins
Copy link

Merged build finished. Test FAILed.

@zhichao-li
Copy link
Contributor Author

retest this please

@AmplabJenkins
Copy link

Merged build triggered.

@AmplabJenkins
Copy link

Merged build started.

@SparkQA
Copy link

SparkQA commented Jun 29, 2015

Test build #35949 has started for PR 7035 at commit 6bdd7f1.

@SparkQA
Copy link

SparkQA commented Jun 29, 2015

Test build #35949 has finished for PR 7035 at commit 6bdd7f1.

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

@AmplabJenkins
Copy link

Merged build finished. Test PASSed.

Copy link
Contributor

Choose a reason for hiding this comment

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

space before {

Copy link
Contributor

Choose a reason for hiding this comment

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

Not just child?

@chenghao-intel
Copy link
Contributor

Can you wait a little bit for #7034? Hopefully it will be simpler once #7034 merged.

@zhichao-li zhichao-li force-pushed the shiftRightUnsigned branch from 6bdd7f1 to b973ac7 Compare July 2, 2015 04:36
@zhichao-li zhichao-li changed the title [SPARK-8226][SQL][WIP] Add function shiftrightunsigned [SPARK-8226]SPARK-8223][SPARK-8224[SQL][WIP] Add function shiftrightunsigned shiftright and shiftleft Jul 2, 2015
@AmplabJenkins
Copy link

Merged build triggered.

@AmplabJenkins
Copy link

Merged build started.

@zhichao-li zhichao-li changed the title [SPARK-8226]SPARK-8223][SPARK-8224[SQL][WIP] Add function shiftrightunsigned shiftright and shiftleft [SPARK-8226][SPARK-8223][SPARK-8224[SQL][WIP] Add function shiftrightunsigned shiftright and shiftleft Jul 2, 2015
@SparkQA
Copy link

SparkQA commented Jul 2, 2015

Test build #36338 has started for PR 7035 at commit b973ac7.

@SparkQA
Copy link

SparkQA commented Jul 2, 2015

Test build #36338 has finished for PR 7035 at commit b973ac7.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class ShiftLeft(valueExpr: Expression, bitsExpr: Expression)
    • case class ShiftRight(valueExpr: Expression, bitsExpr: Expression)
    • case class ShiftRightUnsigned(valueExpr: Expression, bitsExpr: Expression)

@AmplabJenkins
Copy link

Merged build finished. Test FAILed.

@AmplabJenkins
Copy link

Merged build triggered.

@AmplabJenkins
Copy link

Merged build started.

@SparkQA
Copy link

SparkQA commented Jul 2, 2015

Test build #36346 has started for PR 7035 at commit 945a45d.

@SparkQA
Copy link

SparkQA commented Jul 2, 2015

Test build #36346 has finished for PR 7035 at commit 945a45d.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class ShiftLeft(valueExpr: Expression, bitsExpr: Expression)
    • case class ShiftRight(valueExpr: Expression, bitsExpr: Expression)
    • case class ShiftRightUnsigned(valueExpr: Expression, bitsExpr: Expression)

@AmplabJenkins
Copy link

Merged build finished. Test PASSed.

Copy link
Contributor

Choose a reason for hiding this comment

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

BinaryExpression?

Copy link
Contributor

Choose a reason for hiding this comment

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

Or

abstract class BitwiseShiftExpression  extends Expression {
  def value: Expression
  def bits: Expression
...
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Remove it also?

@zhichao-li zhichao-li force-pushed the shiftRightUnsigned branch from 945a45d to d85ae0b Compare July 3, 2015 05:09
@zhichao-li zhichao-li changed the title [SPARK-8226][SPARK-8223][SPARK-8224[SQL][WIP] Add function shiftrightunsigned shiftright and shiftleft [SPARK-8226][SQL]Add function shiftrightunsigned Jul 3, 2015
@AmplabJenkins
Copy link

Merged build triggered.

@AmplabJenkins
Copy link

Merged build started.

@zhichao-li
Copy link
Contributor Author

Since [#7178] has been merged, I can just simply create a similar one to implement the shiftrightunsigned. cc @davies @tarekauel

@SparkQA
Copy link

SparkQA commented Jul 3, 2015

Test build #36473 has started for PR 7035 at commit d85ae0b.

@SparkQA
Copy link

SparkQA commented Jul 3, 2015

Test build #36473 has finished for PR 7035 at commit d85ae0b.

  • This patch fails Python style tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class Factorial(child: Expression) extends UnaryExpression with ExpectsInputTypes
    • case class ShiftRightUnsigned(left: Expression, right: Expression) extends BinaryExpression

@AmplabJenkins
Copy link

Merged build finished. Test FAILed.

@AmplabJenkins
Copy link

Merged build triggered.

@AmplabJenkins
Copy link

Merged build started.

@SparkQA
Copy link

SparkQA commented Jul 3, 2015

Test build #36476 has started for PR 7035 at commit 3e9f5ae.

Copy link
Contributor

Choose a reason for hiding this comment

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

That one is interesting. Have you seen my comment? Can you have a look on that gist: https://gist.github.com/tarekauel/6994983b83a51668c5dc. Am I getting something wrong?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

humm, using pattern match with a typed pattern is indeed a best practice in scala rather than type tests and casts. @chenghao-intel any comments?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just after a second thought the two styles should not have such huge difference. By reducing one parameter: dataType , the testing result is quite close.
https://gist.github.com/zhichao-li/bff04ed95ef72d09d0e9 A: 10 B: 26

but anyway, seems like pattern match with a typed pattern is a little bit faster, if no objections, I'm going to revert to that style.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I was surprised too. Thanks for figuring out!

Copy link
Contributor

Choose a reason for hiding this comment

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

Have you ever try something like https://github.com/apache/spark/pull/7034/files#diff-d788f93e29b4d25cdd7d60328587678bR359 ?
Since the data type is fixed once the expression created, I don't think we need to check the data type during the runtime, even we don't need the pattern match at all in eval (in runtime).

@SparkQA
Copy link

SparkQA commented Jul 3, 2015

Test build #36476 has finished for PR 7035 at commit 3e9f5ae.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • class Word2VecModel(JavaVectorTransformer, JavaSaveable, JavaLoader):
    • case class CreateNamedStruct(children: Seq[Expression]) extends Expression
    • case class Factorial(child: Expression) extends UnaryExpression with ExpectsInputTypes
    • case class ShiftLeft(left: Expression, right: Expression) extends BinaryExpression
    • case class ShiftRight(left: Expression, right: Expression) extends BinaryExpression
    • case class ShiftRightUnsigned(left: Expression, right: Expression) extends BinaryExpression
    • case class Md5(child: Expression) extends UnaryExpression with ExpectsInputTypes
    • case class Sha1(child: Expression) extends UnaryExpression with ExpectsInputTypes
    • case class Crc32(child: Expression) extends UnaryExpression with ExpectsInputTypes
    • case class Not(child: Expression) extends UnaryExpression with Predicate with ExpectsInputTypes
    • trait StringRegexExpression extends ExpectsInputTypes
    • trait CaseConversionExpression extends ExpectsInputTypes
    • trait StringComparison extends ExpectsInputTypes
    • case class StringLength(child: Expression) extends UnaryExpression with ExpectsInputTypes
    • protected[sql] abstract class AtomicType extends DataType
    • abstract class NumericType extends AtomicType
    • abstract class DataType extends AbstractDataType

@AmplabJenkins
Copy link

Merged build finished. Test PASSed.

@AmplabJenkins
Copy link

Merged build triggered.

@AmplabJenkins
Copy link

Merged build started.

@SparkQA
Copy link

SparkQA commented Jul 3, 2015

Test build #36490 has started for PR 7035 at commit 6bcca5a.

@SparkQA
Copy link

SparkQA commented Jul 3, 2015

Test build #36490 has finished for PR 7035 at commit 6bcca5a.

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

@AmplabJenkins
Copy link

Merged build finished. Test PASSed.

@davies
Copy link
Contributor

davies commented Jul 3, 2015

LGTM, merging this into master, thanks!

@asfgit asfgit closed this in ab535b9 Jul 3, 2015
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.

7 participants