Skip to content

Conversation

@adrian-wang
Copy link
Contributor

No description provided.

@SparkQA
Copy link

SparkQA commented Sep 10, 2014

QA tests have started for PR 2344 at commit ce576b3.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Sep 10, 2014

QA tests have finished for PR 2344 at commit ce576b3.

  • This patch fails unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class Cast(child: Expression, dataType: DataType) extends UnaryExpression with Logging

@adrian-wang adrian-wang changed the title [SPARK-3407][SQL]Add Date type support [SPARK-3407][SQL][wip]Add Date type support Sep 10, 2014
@SparkQA
Copy link

SparkQA commented Sep 11, 2014

QA tests have started for PR 2344 at commit 7269bba.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Sep 11, 2014

QA tests have finished for PR 2344 at commit 7269bba.

  • This patch passes unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class Cast(child: Expression, dataType: DataType) extends UnaryExpression with Logging

@adrian-wang adrian-wang changed the title [SPARK-3407][SQL][wip]Add Date type support [SPARK-3407][SQL]Add Date type support Sep 11, 2014
@adrian-wang
Copy link
Contributor Author

Ha, first pass in recent days!

@adrian-wang adrian-wang changed the title [SPARK-3407][SQL]Add Date type support [SPARK-3407][SQL][WIP]Add Date type support Sep 11, 2014
.gitignore Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

We are considering removing the need for this special config file in #2263 so maybe best to leave this out.

@marmbrus
Copy link
Contributor

This looks pretty awesome! I'd like to do a quick pass and make sure there aren't any missing places, but overall this looks complete to me. Is there a reason the PR title still says WIP?

@adrian-wang
Copy link
Contributor Author

The last thing here is to enable date_udf.q. Currently there are two issues:

  1. PR [SPARK-3485][SQL] should check parameter type when look for constructors #2355 org.apache.hadoop.hive.serde2.io.DateWritable got two constructors take one parameter, one is int and the other java.sql.Date, would both be int primitiveTypes and cause random failure when call this in a function.
  2. Have to figure out how to enable datediff(TimestampType, ...), currently this would lead to a scala.Matcherror because it seems try to cast TimestampType to TimestampType in ConstantFolding, still looking why this is not solved in SimplifyCasts.

@SparkQA
Copy link

SparkQA commented Sep 12, 2014

QA tests have started for PR 2344 at commit 7ed5450.

  • This patch merges cleanly.

@adrian-wang
Copy link
Contributor Author

@marmbrus Cheng Hao's PR #2368 will resolve the second issue :).
After #2368 and #2355 are merged, I'll rebase my code and add date_udf to white list.

@SparkQA
Copy link

SparkQA commented Sep 12, 2014

QA tests have finished for PR 2344 at commit 7ed5450.

  • This patch passes unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class Cast(child: Expression, dataType: DataType) extends UnaryExpression with Logging
    • public class DateType extends DataType

@adrian-wang adrian-wang changed the title [SPARK-3407][SQL][WIP]Add Date type support [SPARK-3407][SQL]Add Date type support Sep 12, 2014
@SparkQA
Copy link

SparkQA commented Sep 17, 2014

QA tests have started for PR 2344 at commit 413f946.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Sep 17, 2014

QA tests have finished for PR 2344 at commit 413f946.

  • This patch fails unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class Cast(child: Expression, dataType: DataType) extends UnaryExpression with Logging
    • public class DateType extends DataType

@adrian-wang
Copy link
Contributor Author

Just rebase code, the failure is in spark-core and not in this patch.

@liancheng
Copy link
Contributor

test this please

@SparkQA
Copy link

SparkQA commented Sep 17, 2014

QA tests have started for PR 2344 at commit 413f946.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Sep 17, 2014

QA tests have finished for PR 2344 at commit 413f946.

  • This patch fails unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class Cast(child: Expression, dataType: DataType) extends UnaryExpression with Logging
    • public class DateType extends DataType

Copy link
Contributor

Choose a reason for hiding this comment

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

I didn't check this in Hive, but probably it's better to convert the Date => Timestamp, since Timestamp is more precise. The same for the rule In .

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To get the same result from hive, seems we have to change everything to string here.

@chenghao-intel
Copy link
Contributor

A few comments on returns null V.S. raise exception in Cast, and which is the more wider type for Date and Timestamp, the other LGTM.

Copy link
Contributor

Choose a reason for hiding this comment

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

Using .getTime to do the comparison would be much more efficient. When caching a DateType column, this function is really a critical path.

@liancheng
Copy link
Contributor

Left some minor comments, otherwise LGTM. Also, do we want to add Python API in this PR or a separate one?

@adrian-wang
Copy link
Contributor Author

I can see most of the reviews are focused on comparing and ordering. I'd like to fix those comparing rules in a separated PR. I tested what you declared here the other day, that was also different from what Hive did. Also Python API is can be a separated PR.

@SparkQA
Copy link

SparkQA commented Oct 10, 2014

QA tests have started for PR 2344 at commit 00fe81f.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Oct 10, 2014

QA tests have started for PR 2344 at commit 2038085.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Oct 10, 2014

QA tests have started for PR 2344 at commit f15074a.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Oct 10, 2014

QA tests have finished for PR 2344 at commit 00fe81f.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class Cast(child: Expression, dataType: DataType) extends UnaryExpression with Logging
    • public class DateType extends DataType

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21591/Test FAILed.

@SparkQA
Copy link

SparkQA commented Oct 10, 2014

QA tests have finished for PR 2344 at commit 2038085.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class Cast(child: Expression, dataType: DataType) extends UnaryExpression with Logging
    • public class DateType extends DataType

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21592/Test FAILed.

@adrian-wang
Copy link
Contributor Author

Seems we are getting something wrong with orc in jenkins... My local test is fine.

@liancheng
Copy link
Contributor

I guess this one is related: 411cf29

@SparkQA
Copy link

SparkQA commented Oct 10, 2014

QA tests have finished for PR 2344 at commit f15074a.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class Cast(child: Expression, dataType: DataType) extends UnaryExpression with Logging
    • public class DateType extends DataType

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21593/Test FAILed.

@adrian-wang
Copy link
Contributor Author

retest this please.

@SparkQA
Copy link

SparkQA commented Oct 10, 2014

QA tests have started for PR 2344 at commit f15074a.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Oct 10, 2014

QA tests have finished for PR 2344 at commit f15074a.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class Cast(child: Expression, dataType: DataType) extends UnaryExpression with Logging
    • public class DateType extends DataType

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21594/Test FAILed.

@adrian-wang
Copy link
Contributor Author

retest this please.

@SparkQA
Copy link

SparkQA commented Oct 11, 2014

QA tests have started for PR 2344 at commit f15074a.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Oct 11, 2014

QA tests have finished for PR 2344 at commit f15074a.

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

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21615/Test PASSed.

@marmbrus
Copy link
Contributor

Thanks for working on this huge feature! Merged to master.

@asfgit asfgit closed this in 2ac40da Oct 13, 2014
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.

6 participants