You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/10/26 11:58:23 UTC

[GitHub] [flink] snuyanzin opened a new pull request #17569: [FLINK-24648] CEIL and FLOOR should support DECADE, CENTURY, MILLENNIUM

snuyanzin opened a new pull request #17569:
URL: https://github.com/apache/flink/pull/17569


   ## What is the purpose of the change
   
   The PR fixes return results for quieries like
   
   ```sql
   select ceil(current_timestamp to decade);
   select ceil(current_timestamp to decade);
   select ceil(current_timestamp to decade);
   ```
   
   
   ## Brief change log
   
   *(for example:)*
     - *The TaskInfo is stored in the blob store on job creation time as a persistent artifact*
     - *Deployments RPC transmits only the blob storage reference*
     - *TaskManagers retrieve the TaskInfo from the blob cache*
   
   
   ## Verifying this change
   
   *(Please pick either of the following options)*
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   *(or)*
   
   This change is already covered by existing tests, such as *(please describe tests)*.
   
   *(or)*
   
   This change added tests and can be verified as follows:
   
   *(example:)*
     - *Added integration tests for end-to-end deployment with large payloads (100MB)*
     - *Extended integration test for recovery after master (JobManager) failure*
     - *Added test that validates that TaskInfo is transferred only once across recoveries*
     - *Manually verified the change by running a 4 node cluser with 2 JobManagers and 4 TaskManagers, a stateful streaming program, and killing one JobManager and two TaskManagers during the execution, verifying that recovery happens correctly.*
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (yes / no)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (yes / no)
     - The serializers: (yes / no / don't know)
     - The runtime per-record code paths (performance sensitive): (yes / no / don't know)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / no / don't know)
     - The S3 file system connector: (yes / no / don't know)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (yes / no)
     - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17569: [FLINK-24648] CEIL and FLOOR should support DECADE, CENTURY, MILLENNIUM

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17569:
URL: https://github.com/apache/flink/pull/17569#issuecomment-951868685


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "2730f733c2cd70dea5c1c9862e1a016ecd9705e2",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25467",
       "triggerID" : "2730f733c2cd70dea5c1c9862e1a016ecd9705e2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8d34e32482fd19e3e0bb1e64af793ce5d3138b98",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25495",
       "triggerID" : "8d34e32482fd19e3e0bb1e64af793ce5d3138b98",
       "triggerType" : "PUSH"
     }, {
       "hash" : "520393631cc0c66cc4fb583adb8bc844e2f8905d",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25631",
       "triggerID" : "520393631cc0c66cc4fb583adb8bc844e2f8905d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 520393631cc0c66cc4fb583adb8bc844e2f8905d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25631) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] JingsongLi merged pull request #17569: [FLINK-24648] CEIL and FLOOR should support DECADE, CENTURY, MILLENNIUM

Posted by GitBox <gi...@apache.org>.
JingsongLi merged pull request #17569:
URL: https://github.com/apache/flink/pull/17569






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] JingsongLi removed a comment on pull request #17569: [FLINK-24648] CEIL and FLOOR should support DECADE, CENTURY, MILLENNIUM

Posted by GitBox <gi...@apache.org>.
JingsongLi removed a comment on pull request #17569:
URL: https://github.com/apache/flink/pull/17569#issuecomment-958638514


   Hi @snuyanzin , I'm a little confused. Is the beginning of the era 00 or 01? Have you investigated the behavior of other databases?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] snuyanzin commented on pull request #17569: [FLINK-24648] CEIL and FLOOR should support DECADE, CENTURY, MILLENNIUM

Posted by GitBox <gi...@apache.org>.
snuyanzin commented on pull request #17569:
URL: https://github.com/apache/flink/pull/17569#issuecomment-954576448


   Hi @tsreaper  thanks for letting me know about fixed python issue. I didn't know about it.
   If you don't mind I will also squash the commits into one


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] tsreaper commented on pull request #17569: [FLINK-24648] CEIL and FLOOR should support DECADE, CENTURY, MILLENNIUM

Posted by GitBox <gi...@apache.org>.
tsreaper commented on pull request #17569:
URL: https://github.com/apache/flink/pull/17569#issuecomment-954577624


   Since the review is over feel free to squash the commits. The committers merging this PR will also do it for you if you choose not to squash them.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] snuyanzin commented on pull request #17569: [FLINK-24648] CEIL and FLOOR should support DECADE, CENTURY, MILLENNIUM

Posted by GitBox <gi...@apache.org>.
snuyanzin commented on pull request #17569:
URL: https://github.com/apache/flink/pull/17569#issuecomment-952619096


   Thanks for the catch, done


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] JingsongLi commented on a change in pull request #17569: [FLINK-24648] CEIL and FLOOR should support DECADE, CENTURY, MILLENNIUM

Posted by GitBox <gi...@apache.org>.
JingsongLi commented on a change in pull request #17569:
URL: https://github.com/apache/flink/pull/17569#discussion_r741603842



##########
File path: flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/expressions/TemporalTypesTest.scala
##########
@@ -890,14 +890,24 @@ class TemporalTypesTest extends ExpressionTestBase {
     testSqlApi("FLOOR( DATE '2021-03-01' TO WEEK)", "2021-02-28")
     testSqlApi("CEIL( DATE '2021-02-27' TO WEEK)", "2021-02-28")
     testSqlApi("CEIL( DATE '2021-03-01' TO WEEK)", "2021-03-07")
-
+    testSqlApi("CEIL(DATE '2018-01-02' TO DECADE)", "2020-01-01")
+    testSqlApi("CEIL(DATE '2018-03-27' TO CENTURY)", "2101-01-01")

Review comment:
       It really surprised me... not "2100-01-01"....




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] tsreaper commented on a change in pull request #17569: [FLINK-24648] CEIL and FLOOR should support DECADE, CENTURY, MILLENNIUM

Posted by GitBox <gi...@apache.org>.
tsreaper commented on a change in pull request #17569:
URL: https://github.com/apache/flink/pull/17569#discussion_r741678752



##########
File path: flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/expressions/TemporalTypesTest.scala
##########
@@ -890,14 +890,24 @@ class TemporalTypesTest extends ExpressionTestBase {
     testSqlApi("FLOOR( DATE '2021-03-01' TO WEEK)", "2021-02-28")
     testSqlApi("CEIL( DATE '2021-02-27' TO WEEK)", "2021-02-28")
     testSqlApi("CEIL( DATE '2021-03-01' TO WEEK)", "2021-03-07")
-
+    testSqlApi("CEIL(DATE '2018-01-02' TO DECADE)", "2020-01-01")
+    testSqlApi("CEIL(DATE '2018-03-27' TO CENTURY)", "2101-01-01")

Review comment:
       The expected results are from postgre and vertica. See description of FLINK-24648.
   
   From document of postgre:
   > The first century starts at 0001-01-01 00:00:00 AD, although they did not know it at the time. This definition applies to all Gregorian calendar countries. There is no century number 0, you go from -1 century to 1 century. If you disagree with this, please write your complaint to: Pope, Cathedral Saint-Peter of Roma, Vatican.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17569: [FLINK-24648] CEIL and FLOOR should support DECADE, CENTURY, MILLENNIUM

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17569:
URL: https://github.com/apache/flink/pull/17569#issuecomment-951868685


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "2730f733c2cd70dea5c1c9862e1a016ecd9705e2",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25467",
       "triggerID" : "2730f733c2cd70dea5c1c9862e1a016ecd9705e2",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 2730f733c2cd70dea5c1c9862e1a016ecd9705e2 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25467) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] JingsongLi commented on pull request #17569: [FLINK-24648] CEIL and FLOOR should support DECADE, CENTURY, MILLENNIUM

Posted by GitBox <gi...@apache.org>.
JingsongLi commented on pull request #17569:
URL: https://github.com/apache/flink/pull/17569#issuecomment-958638514


   Hi @snuyanzin , I'm a little confused. Is the beginning of the era 00 or 01? Have you investigated the behavior of other databases?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] JingsongLi commented on pull request #17569: [FLINK-24648] CEIL and FLOOR should support DECADE, CENTURY, MILLENNIUM

Posted by GitBox <gi...@apache.org>.
JingsongLi commented on pull request #17569:
URL: https://github.com/apache/flink/pull/17569#issuecomment-958638514


   Hi @snuyanzin , I'm a little confused. Is the beginning of the era 00 or 01? Have you investigated the behavior of other databases?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17569: [FLINK-24648] CEIL and FLOOR should support DECADE, CENTURY, MILLENNIUM

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17569:
URL: https://github.com/apache/flink/pull/17569#issuecomment-951868685


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "2730f733c2cd70dea5c1c9862e1a016ecd9705e2",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25467",
       "triggerID" : "2730f733c2cd70dea5c1c9862e1a016ecd9705e2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8d34e32482fd19e3e0bb1e64af793ce5d3138b98",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25495",
       "triggerID" : "8d34e32482fd19e3e0bb1e64af793ce5d3138b98",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 8d34e32482fd19e3e0bb1e64af793ce5d3138b98 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25495) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] JingsongLi commented on pull request #17569: [FLINK-24648] CEIL and FLOOR should support DECADE, CENTURY, MILLENNIUM

Posted by GitBox <gi...@apache.org>.
JingsongLi commented on pull request #17569:
URL: https://github.com/apache/flink/pull/17569#issuecomment-958638514


   Hi @snuyanzin , I'm a little confused. Is the beginning of the era 00 or 01? Have you investigated the behavior of other databases?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] tsreaper commented on pull request #17569: [FLINK-24648] CEIL and FLOOR should support DECADE, CENTURY, MILLENNIUM

Posted by GitBox <gi...@apache.org>.
tsreaper commented on pull request #17569:
URL: https://github.com/apache/flink/pull/17569#issuecomment-954565278


   Hi @snuyanzin ! There used to be a problem with the python tests in master branch. This problem has been fixed so please rebase onto the latest master and run the CI again. Please keep an eye on the CI results.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] tsreaper commented on a change in pull request #17569: [FLINK-24648] CEIL and FLOOR should support DECADE, CENTURY, MILLENNIUM

Posted by GitBox <gi...@apache.org>.
tsreaper commented on a change in pull request #17569:
URL: https://github.com/apache/flink/pull/17569#discussion_r741678752



##########
File path: flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/expressions/TemporalTypesTest.scala
##########
@@ -890,14 +890,24 @@ class TemporalTypesTest extends ExpressionTestBase {
     testSqlApi("FLOOR( DATE '2021-03-01' TO WEEK)", "2021-02-28")
     testSqlApi("CEIL( DATE '2021-02-27' TO WEEK)", "2021-02-28")
     testSqlApi("CEIL( DATE '2021-03-01' TO WEEK)", "2021-03-07")
-
+    testSqlApi("CEIL(DATE '2018-01-02' TO DECADE)", "2020-01-01")
+    testSqlApi("CEIL(DATE '2018-03-27' TO CENTURY)", "2101-01-01")

Review comment:
       The expected results are from postgre and vertica. See description of FLINK-24648.
   
   From document of postgre:
   > The first century starts at 0001-01-01 00:00:00 AD, although they did not know it at the time. This definition applies to all Gregorian calendar countries. There is no century number 0, you go from -1 century to 1 century. If you disagree with this, please write your complaint to: Pope, Cathedral Saint-Peter of Roma, Vatican.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot commented on pull request #17569: [FLINK-24648] CEIL and FLOOR should support DECADE, CENTURY, MILLENNIUM

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #17569:
URL: https://github.com/apache/flink/pull/17569#issuecomment-951868685


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "2730f733c2cd70dea5c1c9862e1a016ecd9705e2",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "2730f733c2cd70dea5c1c9862e1a016ecd9705e2",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 2730f733c2cd70dea5c1c9862e1a016ecd9705e2 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot commented on pull request #17569: [FLINK-24648] CEIL and FLOOR should support DECADE, CENTURY, MILLENNIUM

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #17569:
URL: https://github.com/apache/flink/pull/17569#issuecomment-951868241


   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit 2730f733c2cd70dea5c1c9862e1a016ecd9705e2 (Tue Oct 26 12:02:09 UTC 2021)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
    * **This pull request references an unassigned [Jira ticket](https://issues.apache.org/jira/browse/FLINK-24648).** According to the [code contribution guide](https://flink.apache.org/contributing/contribute-code.html), tickets need to be assigned before starting with the implementation work.
   
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] snuyanzin commented on pull request #17569: [FLINK-24648] CEIL and FLOOR should support DECADE, CENTURY, MILLENNIUM

Posted by GitBox <gi...@apache.org>.
snuyanzin commented on pull request #17569:
URL: https://github.com/apache/flink/pull/17569#issuecomment-956083603


   @tsreaper thanks, done


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17569: [FLINK-24648] CEIL and FLOOR should support DECADE, CENTURY, MILLENNIUM

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17569:
URL: https://github.com/apache/flink/pull/17569#issuecomment-951868685


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "2730f733c2cd70dea5c1c9862e1a016ecd9705e2",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25467",
       "triggerID" : "2730f733c2cd70dea5c1c9862e1a016ecd9705e2",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 2730f733c2cd70dea5c1c9862e1a016ecd9705e2 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25467) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] JingsongLi removed a comment on pull request #17569: [FLINK-24648] CEIL and FLOOR should support DECADE, CENTURY, MILLENNIUM

Posted by GitBox <gi...@apache.org>.
JingsongLi removed a comment on pull request #17569:
URL: https://github.com/apache/flink/pull/17569#issuecomment-958638514


   Hi @snuyanzin , I'm a little confused. Is the beginning of the era 00 or 01? Have you investigated the behavior of other databases?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] JingsongLi commented on pull request #17569: [FLINK-24648] CEIL and FLOOR should support DECADE, CENTURY, MILLENNIUM

Posted by GitBox <gi...@apache.org>.
JingsongLi commented on pull request #17569:
URL: https://github.com/apache/flink/pull/17569#issuecomment-958638514


   Hi @snuyanzin , I'm a little confused. Is the beginning of the era 00 or 01? Have you investigated the behavior of other databases?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] JingsongLi merged pull request #17569: [FLINK-24648] CEIL and FLOOR should support DECADE, CENTURY, MILLENNIUM

Posted by GitBox <gi...@apache.org>.
JingsongLi merged pull request #17569:
URL: https://github.com/apache/flink/pull/17569


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] JingsongLi commented on a change in pull request #17569: [FLINK-24648] CEIL and FLOOR should support DECADE, CENTURY, MILLENNIUM

Posted by GitBox <gi...@apache.org>.
JingsongLi commented on a change in pull request #17569:
URL: https://github.com/apache/flink/pull/17569#discussion_r741603842



##########
File path: flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/expressions/TemporalTypesTest.scala
##########
@@ -890,14 +890,24 @@ class TemporalTypesTest extends ExpressionTestBase {
     testSqlApi("FLOOR( DATE '2021-03-01' TO WEEK)", "2021-02-28")
     testSqlApi("CEIL( DATE '2021-02-27' TO WEEK)", "2021-02-28")
     testSqlApi("CEIL( DATE '2021-03-01' TO WEEK)", "2021-03-07")
-
+    testSqlApi("CEIL(DATE '2018-01-02' TO DECADE)", "2020-01-01")
+    testSqlApi("CEIL(DATE '2018-03-27' TO CENTURY)", "2101-01-01")

Review comment:
       It really surprised me... not "2100-01-01"....




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] tsreaper commented on a change in pull request #17569: [FLINK-24648] CEIL and FLOOR should support DECADE, CENTURY, MILLENNIUM

Posted by GitBox <gi...@apache.org>.
tsreaper commented on a change in pull request #17569:
URL: https://github.com/apache/flink/pull/17569#discussion_r741678752



##########
File path: flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/expressions/TemporalTypesTest.scala
##########
@@ -890,14 +890,24 @@ class TemporalTypesTest extends ExpressionTestBase {
     testSqlApi("FLOOR( DATE '2021-03-01' TO WEEK)", "2021-02-28")
     testSqlApi("CEIL( DATE '2021-02-27' TO WEEK)", "2021-02-28")
     testSqlApi("CEIL( DATE '2021-03-01' TO WEEK)", "2021-03-07")
-
+    testSqlApi("CEIL(DATE '2018-01-02' TO DECADE)", "2020-01-01")
+    testSqlApi("CEIL(DATE '2018-03-27' TO CENTURY)", "2101-01-01")

Review comment:
       The expected results are from postgre and vertica. See description of FLINK-24648.
   
   From document of postgre:
   > The first century starts at 0001-01-01 00:00:00 AD, although they did not know it at the time. This definition applies to all Gregorian calendar countries. There is no century number 0, you go from -1 century to 1 century. If you disagree with this, please write your complaint to: Pope, Cathedral Saint-Peter of Roma, Vatican.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] JingsongLi merged pull request #17569: [FLINK-24648] CEIL and FLOOR should support DECADE, CENTURY, MILLENNIUM

Posted by GitBox <gi...@apache.org>.
JingsongLi merged pull request #17569:
URL: https://github.com/apache/flink/pull/17569


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] JingsongLi commented on a change in pull request #17569: [FLINK-24648] CEIL and FLOOR should support DECADE, CENTURY, MILLENNIUM

Posted by GitBox <gi...@apache.org>.
JingsongLi commented on a change in pull request #17569:
URL: https://github.com/apache/flink/pull/17569#discussion_r741603842



##########
File path: flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/expressions/TemporalTypesTest.scala
##########
@@ -890,14 +890,24 @@ class TemporalTypesTest extends ExpressionTestBase {
     testSqlApi("FLOOR( DATE '2021-03-01' TO WEEK)", "2021-02-28")
     testSqlApi("CEIL( DATE '2021-02-27' TO WEEK)", "2021-02-28")
     testSqlApi("CEIL( DATE '2021-03-01' TO WEEK)", "2021-03-07")
-
+    testSqlApi("CEIL(DATE '2018-01-02' TO DECADE)", "2020-01-01")
+    testSqlApi("CEIL(DATE '2018-03-27' TO CENTURY)", "2101-01-01")

Review comment:
       It really surprised me... not "2100-01-01"....




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17569: [FLINK-24648] CEIL and FLOOR should support DECADE, CENTURY, MILLENNIUM

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17569:
URL: https://github.com/apache/flink/pull/17569#issuecomment-951868685


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "2730f733c2cd70dea5c1c9862e1a016ecd9705e2",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25467",
       "triggerID" : "2730f733c2cd70dea5c1c9862e1a016ecd9705e2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8d34e32482fd19e3e0bb1e64af793ce5d3138b98",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "8d34e32482fd19e3e0bb1e64af793ce5d3138b98",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 2730f733c2cd70dea5c1c9862e1a016ecd9705e2 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25467) 
   * 8d34e32482fd19e3e0bb1e64af793ce5d3138b98 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17569: [FLINK-24648] CEIL and FLOOR should support DECADE, CENTURY, MILLENNIUM

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17569:
URL: https://github.com/apache/flink/pull/17569#issuecomment-951868685


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "2730f733c2cd70dea5c1c9862e1a016ecd9705e2",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25467",
       "triggerID" : "2730f733c2cd70dea5c1c9862e1a016ecd9705e2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8d34e32482fd19e3e0bb1e64af793ce5d3138b98",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25495",
       "triggerID" : "8d34e32482fd19e3e0bb1e64af793ce5d3138b98",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 2730f733c2cd70dea5c1c9862e1a016ecd9705e2 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25467) 
   * 8d34e32482fd19e3e0bb1e64af793ce5d3138b98 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25495) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17569: [FLINK-24648] CEIL and FLOOR should support DECADE, CENTURY, MILLENNIUM

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17569:
URL: https://github.com/apache/flink/pull/17569#issuecomment-951868685


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "2730f733c2cd70dea5c1c9862e1a016ecd9705e2",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25467",
       "triggerID" : "2730f733c2cd70dea5c1c9862e1a016ecd9705e2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8d34e32482fd19e3e0bb1e64af793ce5d3138b98",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25495",
       "triggerID" : "8d34e32482fd19e3e0bb1e64af793ce5d3138b98",
       "triggerType" : "PUSH"
     }, {
       "hash" : "520393631cc0c66cc4fb583adb8bc844e2f8905d",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "520393631cc0c66cc4fb583adb8bc844e2f8905d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 8d34e32482fd19e3e0bb1e64af793ce5d3138b98 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25495) 
   * 520393631cc0c66cc4fb583adb8bc844e2f8905d UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17569: [FLINK-24648] CEIL and FLOOR should support DECADE, CENTURY, MILLENNIUM

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17569:
URL: https://github.com/apache/flink/pull/17569#issuecomment-951868685


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "2730f733c2cd70dea5c1c9862e1a016ecd9705e2",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25467",
       "triggerID" : "2730f733c2cd70dea5c1c9862e1a016ecd9705e2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8d34e32482fd19e3e0bb1e64af793ce5d3138b98",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25495",
       "triggerID" : "8d34e32482fd19e3e0bb1e64af793ce5d3138b98",
       "triggerType" : "PUSH"
     }, {
       "hash" : "520393631cc0c66cc4fb583adb8bc844e2f8905d",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25631",
       "triggerID" : "520393631cc0c66cc4fb583adb8bc844e2f8905d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 8d34e32482fd19e3e0bb1e64af793ce5d3138b98 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25495) 
   * 520393631cc0c66cc4fb583adb8bc844e2f8905d Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25631) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] JingsongLi removed a comment on pull request #17569: [FLINK-24648] CEIL and FLOOR should support DECADE, CENTURY, MILLENNIUM

Posted by GitBox <gi...@apache.org>.
JingsongLi removed a comment on pull request #17569:
URL: https://github.com/apache/flink/pull/17569#issuecomment-958638514


   Hi @snuyanzin , I'm a little confused. Is the beginning of the era 00 or 01? Have you investigated the behavior of other databases?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] JingsongLi commented on a change in pull request #17569: [FLINK-24648] CEIL and FLOOR should support DECADE, CENTURY, MILLENNIUM

Posted by GitBox <gi...@apache.org>.
JingsongLi commented on a change in pull request #17569:
URL: https://github.com/apache/flink/pull/17569#discussion_r741603842



##########
File path: flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/expressions/TemporalTypesTest.scala
##########
@@ -890,14 +890,24 @@ class TemporalTypesTest extends ExpressionTestBase {
     testSqlApi("FLOOR( DATE '2021-03-01' TO WEEK)", "2021-02-28")
     testSqlApi("CEIL( DATE '2021-02-27' TO WEEK)", "2021-02-28")
     testSqlApi("CEIL( DATE '2021-03-01' TO WEEK)", "2021-03-07")
-
+    testSqlApi("CEIL(DATE '2018-01-02' TO DECADE)", "2020-01-01")
+    testSqlApi("CEIL(DATE '2018-03-27' TO CENTURY)", "2101-01-01")

Review comment:
       It really surprised me... not "2100-01-01"....




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] tsreaper commented on a change in pull request #17569: [FLINK-24648] CEIL and FLOOR should support DECADE, CENTURY, MILLENNIUM

Posted by GitBox <gi...@apache.org>.
tsreaper commented on a change in pull request #17569:
URL: https://github.com/apache/flink/pull/17569#discussion_r741678752



##########
File path: flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/expressions/TemporalTypesTest.scala
##########
@@ -890,14 +890,24 @@ class TemporalTypesTest extends ExpressionTestBase {
     testSqlApi("FLOOR( DATE '2021-03-01' TO WEEK)", "2021-02-28")
     testSqlApi("CEIL( DATE '2021-02-27' TO WEEK)", "2021-02-28")
     testSqlApi("CEIL( DATE '2021-03-01' TO WEEK)", "2021-03-07")
-
+    testSqlApi("CEIL(DATE '2018-01-02' TO DECADE)", "2020-01-01")
+    testSqlApi("CEIL(DATE '2018-03-27' TO CENTURY)", "2101-01-01")

Review comment:
       The expected results are from postgre and vertica. See description of FLINK-24648.
   
   From document of postgre:
   > The first century starts at 0001-01-01 00:00:00 AD, although they did not know it at the time. This definition applies to all Gregorian calendar countries. There is no century number 0, you go from -1 century to 1 century. If you disagree with this, please write your complaint to: Pope, Cathedral Saint-Peter of Roma, Vatican.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] JingsongLi removed a comment on pull request #17569: [FLINK-24648] CEIL and FLOOR should support DECADE, CENTURY, MILLENNIUM

Posted by GitBox <gi...@apache.org>.
JingsongLi removed a comment on pull request #17569:
URL: https://github.com/apache/flink/pull/17569#issuecomment-958638514


   Hi @snuyanzin , I'm a little confused. Is the beginning of the era 00 or 01? Have you investigated the behavior of other databases?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org