Skip to content

Conversation

@adrian-wang
Copy link
Contributor

No description provided.

@SparkQA
Copy link

SparkQA commented Jun 24, 2015

Test build #35682 has finished for PR 6988 at commit 450159c.

  • This patch fails Scala style tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class ToDate(timestamp: Expression) extends Expression
    • case class TRUNC(date: Expression, format: Expression)

@adrian-wang
Copy link
Contributor Author

Close it because #6782 (comment) for now

@adrian-wang adrian-wang reopened this Jul 22, 2015
@adrian-wang adrian-wang changed the title [WIP] [SPARK-8176] [SPARK-8197] [SQL] Udf to_date/ trunc [SPARK-8176] [SPARK-8197] [SQL] function to_date/ trunc Jul 22, 2015
@adrian-wang
Copy link
Contributor Author

@chenghao-intel

Copy link
Contributor

Choose a reason for hiding this comment

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

Probably only accept the DateType, TimestampType and the StringType, should be Seq(TypeCollection(DateType, TimestampType, StringType)).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TimestampType, StringType should all be convert into DateType.
Actually, I can add a rule in optimizer to delete this node after we have done implicit cast.

Copy link
Contributor

Choose a reason for hiding this comment

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

I mean we don't accept the IntegerType, LongType, do we? Hence we use the TypeCollection, and we'd better inherits from the ExpectInputTypes, instead of the ImplicitCastInputTypes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

int and long could not be cast into datetype.

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems Hive only support date,string or timestamp, but not int, long..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if the cast does not work, we will get an exception, that's expected.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, seems we can remove this expression in optimization.

Copy link
Contributor

Choose a reason for hiding this comment

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

If we removed this expression during optimizing, then we can remove the code gen stuff, too.

Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add a comment says that this rely on implicit casting (from StringType and TimestampType)?

@SparkQA
Copy link

SparkQA commented Jul 22, 2015

Test build #38034 has finished for PR 6988 at commit 0239f33.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class ToDate(child: Expression) extends UnaryExpression with ImplicitCastInputTypes
    • case class Trunc(date: Expression, format: Expression)

@SparkQA
Copy link

SparkQA commented Jul 22, 2015

Test build #38053 has finished for PR 6988 at commit 4054b65.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class ToDate(child: Expression) extends UnaryExpression with ImplicitCastInputTypes
    • case class Trunc(date: Expression, format: Expression)

@adrian-wang
Copy link
Contributor Author

retest this please.

@SparkQA
Copy link

SparkQA commented Jul 22, 2015

Test build #52 has finished for PR 6988 at commit 4054b65.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class ToDate(child: Expression) extends UnaryExpression with ImplicitCastInputTypes
    • case class Trunc(date: Expression, format: Expression)

@SparkQA
Copy link

SparkQA commented Jul 22, 2015

Test build #38055 has finished for PR 6988 at commit 4054b65.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class ToDate(child: Expression) extends UnaryExpression with ImplicitCastInputTypes
    • case class Trunc(date: Expression, format: Expression)

@SparkQA
Copy link

SparkQA commented Jul 22, 2015

Test build #38057 has finished for PR 6988 at commit 4d64e09.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class ToDate(child: Expression) extends UnaryExpression with ImplicitCastInputTypes
    • case class Trunc(date: Expression, format: Expression)

@adrian-wang
Copy link
Contributor Author

retest this please.

@SparkQA
Copy link

SparkQA commented Jul 22, 2015

Test build #58 has finished for PR 6988 at commit 4d64e09.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class ToDate(child: Expression) extends UnaryExpression with ImplicitCastInputTypes
    • case class Trunc(date: Expression, format: Expression)

@adrian-wang
Copy link
Contributor Author

@rxin something is wrong with Jenkins.

@SparkQA
Copy link

SparkQA commented Jul 22, 2015

Test build #38069 has finished for PR 6988 at commit 4d64e09.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class ToDate(child: Expression) extends UnaryExpression with ImplicitCastInputTypes
    • case class Trunc(date: Expression, format: Expression)

@adrian-wang
Copy link
Contributor Author

retest this please.

@SparkQA
Copy link

SparkQA commented Jul 22, 2015

Test build #38093 has finished for PR 6988 at commit 4d64e09.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class ToDate(child: Expression) extends UnaryExpression with ImplicitCastInputTypes
    • case class Trunc(date: Expression, format: Expression)

@SparkQA
Copy link

SparkQA commented Jul 22, 2015

Test build #63 has finished for PR 6988 at commit 4d64e09.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class ToDate(child: Expression) extends UnaryExpression with ImplicitCastInputTypes
    • case class Trunc(date: Expression, format: Expression)

@SparkQA
Copy link

SparkQA commented Jul 23, 2015

Test build #38165 has finished for PR 6988 at commit 0e7c33c.

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

@adrian-wang
Copy link
Contributor Author

retest this please.

@SparkQA
Copy link

SparkQA commented Jul 23, 2015

Test build #78 has finished for PR 6988 at commit d3faa53.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class ToDate(child: Expression) extends UnaryExpression with ImplicitCastInputTypes
    • case class Trunc(date: Expression, format: Expression)

@SparkQA
Copy link

SparkQA commented Jul 23, 2015

Test build #38214 has finished for PR 6988 at commit d3faa53.

  • 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.

Seems this will not trigger the codegen projections, you probably need to use the checkEvaluation instead.

@SparkQA
Copy link

SparkQA commented Jul 27, 2015

Test build #38525 has finished for PR 6988 at commit ce15567.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class ToDate(child: Expression) extends UnaryExpression with ImplicitCastInputTypes
    • case class Trunc(date: Expression, format: Expression)

Copy link
Contributor

Choose a reason for hiding this comment

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

you could override gen to call child.gen()

@SparkQA
Copy link

SparkQA commented Jul 29, 2015

Test build #38847 has finished for PR 6988 at commit a476c5a.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class ToDate(child: Expression) extends UnaryExpression with ImplicitCastInputTypes
    • case class Trunc(date: Expression, format: Expression)

@SparkQA
Copy link

SparkQA commented Jul 30, 2015

Test build #38963 has finished for PR 6988 at commit 980b092.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class ToDate(child: Expression) extends UnaryExpression with ImplicitCastInputTypes
    • case class Trunc(date: Expression, format: Expression)

@SparkQA
Copy link

SparkQA commented Jul 30, 2015

Test build #38987 has finished for PR 6988 at commit 310dd55.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class ToDate(child: Expression) extends UnaryExpression with ImplicitCastInputTypes
    • case class Trunc(date: Expression, format: Expression)

@adrian-wang
Copy link
Contributor Author

retest this please.

@SparkQA
Copy link

SparkQA commented Jul 30, 2015

Test build #156 has finished for PR 6988 at commit 310dd55.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class ToDate(child: Expression) extends UnaryExpression with ImplicitCastInputTypes
    • case class Trunc(date: Expression, format: Expression)

@adrian-wang
Copy link
Contributor Author

retest this please.

@SparkQA
Copy link

SparkQA commented Jul 30, 2015

Test build #38996 has finished for PR 6988 at commit 310dd55.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class ToDate(child: Expression) extends UnaryExpression with ImplicitCastInputTypes
    • case class Trunc(date: Expression, format: Expression)

@SparkQA
Copy link

SparkQA commented Jul 30, 2015

Test build #159 has finished for PR 6988 at commit 310dd55.

  • This patch fails PySpark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class ToDate(child: Expression) extends UnaryExpression with ImplicitCastInputTypes
    • case class Trunc(date: Expression, format: Expression)

@davies
Copy link
Contributor

davies commented Jul 30, 2015

@adrian-wang Thanks for working on this, ti's pretty close, I will take over this one.

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.

5 participants