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 2019/12/26 07:13:47 UTC

[GitHub] [flink] godfreyhe opened a new pull request #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation

godfreyhe opened a new pull request #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation
URL: https://github.com/apache/flink/pull/10694
 
 
   
   
   ## What is the purpose of the change
   
   *sql: `select cast(a as int), cast(b as varchar) from (values (3, 'c')) T(a,b)` will fail, 
   the reason is: the original LogicalProject has collation trait (see the picture in [FLINK-15381](https://issues.apache.org/jira/browse/FLINK-15381): [1] which means the second field is ordered and its direction is ascending), but when LogicalProject converts to LogicalCalc in ProjectToCalcRule, the collation info of new Calc is empty. The root cause is the collation derive logic on RelSubset in RelMdCollation in not collect.
   This PR aim to fix the bug*
   
   
   ## Brief change log
   
     - *Implement Collation handler in Flink (most logic except the part about RelSubset is same with RelMdCollation)*
   
   
   ## Verifying this change
   
   
   This change added tests and can be verified as follows:
   
     - *Added FlinkRelMdCollationTest to verify the collation derive logic on each RelNode *
     - *Added test that validates the plan of `select cast(a as int), cast(b as varchar) from (values (3, 'c')) T(a,b)`*
     
   
   ## 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, Yarn/Mesos, 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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation
URL: https://github.com/apache/flink/pull/10694#issuecomment-569001563
 
 
   <!--
   Meta data
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:PENDING URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=3925 TriggerType:PUSH TriggerID:e9b4471c51446e144d7071480515be858959a352
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/142355379 TriggerType:PUSH TriggerID:e9b4471c51446e144d7071480515be858959a352
   -->
   ## CI report:
   
   * e9b4471c51446e144d7071480515be858959a352 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/142355379) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=3925) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation
URL: https://github.com/apache/flink/pull/10694#issuecomment-569001563
 
 
   <!--
   Meta data
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=3925 TriggerType:PUSH TriggerID:e9b4471c51446e144d7071480515be858959a352
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/142355379 TriggerType:PUSH TriggerID:e9b4471c51446e144d7071480515be858959a352
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/142355379 TriggerType:MANUAL TriggerID:569057856
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=3925 TriggerType:MANUAL TriggerID:569057856
   Hash:a37a0f82b4661edbaff69f873ef7c9a4cd460ed9 Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:a37a0f82b4661edbaff69f873ef7c9a4cd460ed9
   -->
   ## CI report:
   
   * e9b4471c51446e144d7071480515be858959a352 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/142355379) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=3925) 
   * a37a0f82b4661edbaff69f873ef7c9a4cd460ed9 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot commented on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation
URL: https://github.com/apache/flink/pull/10694#issuecomment-569001563
 
 
   <!--
   Meta data
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:e9b4471c51446e144d7071480515be858959a352
   -->
   ## CI report:
   
   * e9b4471c51446e144d7071480515be858959a352 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] godfreyhe commented on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation

Posted by GitBox <gi...@apache.org>.
godfreyhe commented on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation
URL: https://github.com/apache/flink/pull/10694#issuecomment-569057856
 
 
   @flinkbot run travis

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation
URL: https://github.com/apache/flink/pull/10694#issuecomment-569001563
 
 
   <!--
   Meta data
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=3925 TriggerType:PUSH TriggerID:e9b4471c51446e144d7071480515be858959a352
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/142355379 TriggerType:PUSH TriggerID:e9b4471c51446e144d7071480515be858959a352
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/142355379 TriggerType:MANUAL TriggerID:569057856
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=3925 TriggerType:MANUAL TriggerID:569057856
   -->
   ## CI report:
   
   * e9b4471c51446e144d7071480515be858959a352 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/142355379) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=3925) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation
URL: https://github.com/apache/flink/pull/10694#issuecomment-569001563
 
 
   <!--
   Meta data
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=3925 TriggerType:PUSH TriggerID:e9b4471c51446e144d7071480515be858959a352
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/142355379 TriggerType:PUSH TriggerID:e9b4471c51446e144d7071480515be858959a352
   -->
   ## CI report:
   
   * e9b4471c51446e144d7071480515be858959a352 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/142355379) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=3925) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot commented on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation
URL: https://github.com/apache/flink/pull/10694#issuecomment-568996793
 
 
   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 e9b4471c51446e144d7071480515be858959a352 (Thu Dec 26 07:17:26 UTC 2019)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
   
   
   <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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation
URL: https://github.com/apache/flink/pull/10694#issuecomment-569001563
 
 
   <!--
   Meta data
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:PENDING URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=3925 TriggerType:PUSH TriggerID:e9b4471c51446e144d7071480515be858959a352
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:PENDING URL:https://travis-ci.com/flink-ci/flink/builds/142355379 TriggerType:PUSH TriggerID:e9b4471c51446e144d7071480515be858959a352
   -->
   ## CI report:
   
   * e9b4471c51446e144d7071480515be858959a352 Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/142355379) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=3925) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation
URL: https://github.com/apache/flink/pull/10694#issuecomment-569001563
 
 
   <!--
   Meta data
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=3925 TriggerType:PUSH TriggerID:e9b4471c51446e144d7071480515be858959a352
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/142355379 TriggerType:PUSH TriggerID:e9b4471c51446e144d7071480515be858959a352
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/142355379 TriggerType:MANUAL TriggerID:569057856
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=3925 TriggerType:MANUAL TriggerID:569057856
   Hash:a37a0f82b4661edbaff69f873ef7c9a4cd460ed9 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/142833888 TriggerType:PUSH TriggerID:a37a0f82b4661edbaff69f873ef7c9a4cd460ed9
   Hash:a37a0f82b4661edbaff69f873ef7c9a4cd460ed9 Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4032 TriggerType:PUSH TriggerID:a37a0f82b4661edbaff69f873ef7c9a4cd460ed9
   Hash:7a59e4825ca9ce80b8d7562e426491e597a567d2 Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4038 TriggerType:PUSH TriggerID:7a59e4825ca9ce80b8d7562e426491e597a567d2
   Hash:7a59e4825ca9ce80b8d7562e426491e597a567d2 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/142847507 TriggerType:PUSH TriggerID:7a59e4825ca9ce80b8d7562e426491e597a567d2
   -->
   ## CI report:
   
   * e9b4471c51446e144d7071480515be858959a352 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/142355379) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=3925) 
   * a37a0f82b4661edbaff69f873ef7c9a4cd460ed9 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/142833888) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4032) 
   * 7a59e4825ca9ce80b8d7562e426491e597a567d2 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/142847507) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4038) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation
URL: https://github.com/apache/flink/pull/10694#issuecomment-569001563
 
 
   <!--
   Meta data
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=3925 TriggerType:PUSH TriggerID:e9b4471c51446e144d7071480515be858959a352
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/142355379 TriggerType:PUSH TriggerID:e9b4471c51446e144d7071480515be858959a352
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:PENDING URL:https://travis-ci.com/flink-ci/flink/builds/142355379 TriggerType:MANUAL TriggerID:569057856
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=3925 TriggerType:MANUAL TriggerID:569057856
   -->
   ## CI report:
   
   * e9b4471c51446e144d7071480515be858959a352 Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/142355379) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=3925) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] beyond1920 commented on a change in pull request #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation

Posted by GitBox <gi...@apache.org>.
beyond1920 commented on a change in pull request #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation
URL: https://github.com/apache/flink/pull/10694#discussion_r362162286
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/plan/metadata/FlinkRelMdCollation.java
 ##########
 @@ -0,0 +1,557 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.plan.metadata;
+
+import org.apache.calcite.adapter.enumerable.EnumerableCorrelate;
+import org.apache.calcite.adapter.enumerable.EnumerableHashJoin;
+import org.apache.calcite.adapter.enumerable.EnumerableMergeJoin;
+import org.apache.calcite.adapter.enumerable.EnumerableNestedLoopJoin;
+import org.apache.calcite.linq4j.Ord;
+import org.apache.calcite.plan.RelOptTable;
+import org.apache.calcite.plan.hep.HepRelVertex;
+import org.apache.calcite.plan.volcano.RelSubset;
+import org.apache.calcite.rel.RelCollation;
+import org.apache.calcite.rel.RelCollations;
+import org.apache.calcite.rel.RelFieldCollation;
+import org.apache.calcite.rel.RelNode;
+import org.apache.calcite.rel.core.Calc;
+import org.apache.calcite.rel.core.Filter;
+import org.apache.calcite.rel.core.Join;
+import org.apache.calcite.rel.core.JoinRelType;
+import org.apache.calcite.rel.core.Match;
+import org.apache.calcite.rel.core.Project;
+import org.apache.calcite.rel.core.Sort;
+import org.apache.calcite.rel.core.SortExchange;
+import org.apache.calcite.rel.core.TableModify;
+import org.apache.calcite.rel.core.TableScan;
+import org.apache.calcite.rel.core.Values;
+import org.apache.calcite.rel.core.Window;
+import org.apache.calcite.rel.metadata.BuiltInMetadata;
+import org.apache.calcite.rel.metadata.MetadataDef;
+import org.apache.calcite.rel.metadata.MetadataHandler;
+import org.apache.calcite.rel.metadata.ReflectiveRelMetadataProvider;
+import org.apache.calcite.rel.metadata.RelMetadataProvider;
+import org.apache.calcite.rel.metadata.RelMetadataQuery;
+import org.apache.calcite.rel.type.RelDataType;
+import org.apache.calcite.rex.RexCall;
+import org.apache.calcite.rex.RexCallBinding;
+import org.apache.calcite.rex.RexInputRef;
+import org.apache.calcite.rex.RexLiteral;
+import org.apache.calcite.rex.RexNode;
+import org.apache.calcite.rex.RexProgram;
+import org.apache.calcite.sql.validate.SqlMonotonicity;
+import org.apache.calcite.util.BuiltInMethod;
+import org.apache.calcite.util.ImmutableBitSet;
+import org.apache.calcite.util.ImmutableIntList;
+import org.apache.calcite.util.Pair;
+import org.apache.calcite.util.Util;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.SortedSet;
+import java.util.TreeSet;
+import java.util.stream.Collectors;
+
+/**
+ * FlinkRelMdCollation supplies a default implementation of
+ * {@link org.apache.calcite.rel.metadata.RelMetadataQuery#collations}
+ * for the standard logical algebra.
+ */
+public class FlinkRelMdCollation implements MetadataHandler<BuiltInMetadata.Collation> {
+	public static final RelMetadataProvider SOURCE =
+			ReflectiveRelMetadataProvider.reflectiveSource(BuiltInMethod.COLLATIONS.method, new FlinkRelMdCollation());
+
+	//~ Constructors -----------------------------------------------------------
+
+	private FlinkRelMdCollation() {
+	}
+
+	//~ Methods ----------------------------------------------------------------
+
+	public MetadataDef<BuiltInMetadata.Collation> getDef() {
+		return BuiltInMetadata.Collation.DEF;
+	}
+
+	public com.google.common.collect.ImmutableList<RelCollation> collations(TableScan scan, RelMetadataQuery mq) {
+		return com.google.common.collect.ImmutableList.copyOf(table(scan.getTable()));
+	}
+
+	public com.google.common.collect.ImmutableList<RelCollation> collations(Values values, RelMetadataQuery mq) {
+		return com.google.common.collect.ImmutableList.copyOf(values(mq, values.getRowType(), values.getTuples()));
+	}
+
+	public com.google.common.collect.ImmutableList<RelCollation> collations(Project project,
+			RelMetadataQuery mq) {
+		return com.google.common.collect.ImmutableList.copyOf(project(mq, project.getInput(), project.getProjects()));
+	}
+
+	public com.google.common.collect.ImmutableList<RelCollation> collations(Filter rel, RelMetadataQuery mq) {
+		return mq.collations(rel.getInput());
+	}
+
+	public com.google.common.collect.ImmutableList<RelCollation> collations(Calc calc, RelMetadataQuery mq) {
+		return com.google.common.collect.ImmutableList.copyOf(calc(mq, calc.getInput(), calc.getProgram()));
+	}
+
+	public com.google.common.collect.ImmutableList<RelCollation> collations(SortExchange sort, RelMetadataQuery mq) {
+		return com.google.common.collect.ImmutableList.copyOf(sort(sort.getCollation()));
+	}
+
+	public com.google.common.collect.ImmutableList<RelCollation> collations(Sort sort, RelMetadataQuery mq) {
+		return com.google.common.collect.ImmutableList.copyOf(sort(sort.getCollation()));
+	}
+
+	public com.google.common.collect.ImmutableList<RelCollation> collations(Window rel, RelMetadataQuery mq) {
+		return com.google.common.collect.ImmutableList.copyOf(window(mq, rel.getInput(), rel.groups));
+	}
+
+	public com.google.common.collect.ImmutableList<RelCollation> collations(
+			EnumerableCorrelate join,
+			RelMetadataQuery mq) {
+		return com.google.common.collect.ImmutableList.copyOf(
+				enumerableCorrelate(mq, join.getLeft(), join.getRight(), join.getJoinType()));
+	}
+
+	public com.google.common.collect.ImmutableList<RelCollation> collations(
+			EnumerableMergeJoin join,
+			RelMetadataQuery mq) {
+		// In general a join is not sorted. But a merge join preserves the sort
+		// order of the left and right sides.
+		return com.google.common.collect.ImmutableList.copyOf(mergeJoin(
+				mq,
+				join.getLeft(),
+				join.getRight(),
+				join.analyzeCondition().leftKeys,
+				join.analyzeCondition().rightKeys));
+	}
+
+	public com.google.common.collect.ImmutableList<RelCollation> collations(
+			EnumerableHashJoin join,
+			RelMetadataQuery mq) {
+		return com.google.common.collect.ImmutableList.copyOf(
+				enumerableHashJoin(mq, join.getLeft(), join.getRight(), join.getJoinType()));
+	}
+
+	public com.google.common.collect.ImmutableList<RelCollation> collations(
+			EnumerableNestedLoopJoin join,
+			RelMetadataQuery mq) {
+		return com.google.common.collect.ImmutableList.copyOf(
+				enumerableNestedLoopJoin(mq, join.getLeft(), join.getRight(), join.getJoinType()));
+	}
+
+	public com.google.common.collect.ImmutableList<RelCollation> collations(Match rel, RelMetadataQuery mq) {
+		return com.google.common.collect.ImmutableList.copyOf(match(
+				mq,
+				rel.getInput(),
+				rel.getRowType(),
+				rel.getPattern(),
+				rel.isStrictStart(),
+				rel.isStrictEnd(),
+				rel.getPatternDefinitions(),
+				rel.getMeasures(),
+				rel.getAfter(),
+				rel.getSubsets(),
+				rel.isAllRows(),
+				rel.getPartitionKeys(),
+				rel.getOrderKeys(),
+				rel.getInterval()));
+	}
+
+	public com.google.common.collect.ImmutableList<RelCollation> collations(TableModify rel, RelMetadataQuery mq) {
+		return mq.collations(rel.getInput());
+	}
+
+	public com.google.common.collect.ImmutableList<RelCollation> collations(HepRelVertex rel, RelMetadataQuery mq) {
+		return mq.collations(rel.getCurrentRel());
+	}
+
+	public com.google.common.collect.ImmutableList<RelCollation> collations(RelSubset rel, RelMetadataQuery mq) {
+		if (rel.getBest() != null) {
+			return mq.collations(rel.getBest());
+		} else {
+			return mq.collations(rel.getOriginal());
+		}
+	}
+
 
 Review comment:
   The fix makes sense. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] wuchong commented on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation

Posted by GitBox <gi...@apache.org>.
wuchong commented on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation
URL: https://github.com/apache/flink/pull/10694#issuecomment-570143489
 
 
   @godfreyhe could you remove the cast string on this line?
   https://github.com/apache/flink/blob/2e9a7f38fa9971958ed3e02cdaa45528e5e657d4/flink-connectors/flink-connector-hive/src/test/java/org/apache/flink/connectors/hive/TableEnvHiveConnectorTest.java#L229
   
   It should work now if the bug is fixed. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation
URL: https://github.com/apache/flink/pull/10694#issuecomment-569001563
 
 
   <!--
   Meta data
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=3925 TriggerType:PUSH TriggerID:e9b4471c51446e144d7071480515be858959a352
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/142355379 TriggerType:PUSH TriggerID:e9b4471c51446e144d7071480515be858959a352
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/142355379 TriggerType:MANUAL TriggerID:569057856
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=3925 TriggerType:MANUAL TriggerID:569057856
   Hash:a37a0f82b4661edbaff69f873ef7c9a4cd460ed9 Status:PENDING URL:https://travis-ci.com/flink-ci/flink/builds/142833888 TriggerType:PUSH TriggerID:a37a0f82b4661edbaff69f873ef7c9a4cd460ed9
   Hash:a37a0f82b4661edbaff69f873ef7c9a4cd460ed9 Status:PENDING URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4032 TriggerType:PUSH TriggerID:a37a0f82b4661edbaff69f873ef7c9a4cd460ed9
   -->
   ## CI report:
   
   * e9b4471c51446e144d7071480515be858959a352 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/142355379) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=3925) 
   * a37a0f82b4661edbaff69f873ef7c9a4cd460ed9 Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/142833888) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4032) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] beyond1920 commented on a change in pull request #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation

Posted by GitBox <gi...@apache.org>.
beyond1920 commented on a change in pull request #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation
URL: https://github.com/apache/flink/pull/10694#discussion_r362162371
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/plan/metadata/FlinkRelMdCollation.java
 ##########
 @@ -0,0 +1,557 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.plan.metadata;
+
+import org.apache.calcite.adapter.enumerable.EnumerableCorrelate;
+import org.apache.calcite.adapter.enumerable.EnumerableHashJoin;
+import org.apache.calcite.adapter.enumerable.EnumerableMergeJoin;
+import org.apache.calcite.adapter.enumerable.EnumerableNestedLoopJoin;
+import org.apache.calcite.linq4j.Ord;
+import org.apache.calcite.plan.RelOptTable;
+import org.apache.calcite.plan.hep.HepRelVertex;
+import org.apache.calcite.plan.volcano.RelSubset;
+import org.apache.calcite.rel.RelCollation;
+import org.apache.calcite.rel.RelCollations;
+import org.apache.calcite.rel.RelFieldCollation;
+import org.apache.calcite.rel.RelNode;
+import org.apache.calcite.rel.core.Calc;
+import org.apache.calcite.rel.core.Filter;
+import org.apache.calcite.rel.core.Join;
+import org.apache.calcite.rel.core.JoinRelType;
+import org.apache.calcite.rel.core.Match;
+import org.apache.calcite.rel.core.Project;
+import org.apache.calcite.rel.core.Sort;
+import org.apache.calcite.rel.core.SortExchange;
+import org.apache.calcite.rel.core.TableModify;
+import org.apache.calcite.rel.core.TableScan;
+import org.apache.calcite.rel.core.Values;
+import org.apache.calcite.rel.core.Window;
+import org.apache.calcite.rel.metadata.BuiltInMetadata;
+import org.apache.calcite.rel.metadata.MetadataDef;
+import org.apache.calcite.rel.metadata.MetadataHandler;
+import org.apache.calcite.rel.metadata.ReflectiveRelMetadataProvider;
+import org.apache.calcite.rel.metadata.RelMetadataProvider;
+import org.apache.calcite.rel.metadata.RelMetadataQuery;
+import org.apache.calcite.rel.type.RelDataType;
+import org.apache.calcite.rex.RexCall;
+import org.apache.calcite.rex.RexCallBinding;
+import org.apache.calcite.rex.RexInputRef;
+import org.apache.calcite.rex.RexLiteral;
+import org.apache.calcite.rex.RexNode;
+import org.apache.calcite.rex.RexProgram;
+import org.apache.calcite.sql.validate.SqlMonotonicity;
+import org.apache.calcite.util.BuiltInMethod;
+import org.apache.calcite.util.ImmutableBitSet;
+import org.apache.calcite.util.ImmutableIntList;
+import org.apache.calcite.util.Pair;
+import org.apache.calcite.util.Util;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.SortedSet;
+import java.util.TreeSet;
+import java.util.stream.Collectors;
+
+/**
+ * FlinkRelMdCollation supplies a default implementation of
+ * {@link org.apache.calcite.rel.metadata.RelMetadataQuery#collations}
+ * for the standard logical algebra.
+ */
+public class FlinkRelMdCollation implements MetadataHandler<BuiltInMetadata.Collation> {
 
 Review comment:
   Maybe we should add the comment in The code. It's really a long class.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] wuchong merged pull request #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation

Posted by GitBox <gi...@apache.org>.
wuchong merged pull request #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation
URL: https://github.com/apache/flink/pull/10694
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] beyond1920 commented on a change in pull request #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation

Posted by GitBox <gi...@apache.org>.
beyond1920 commented on a change in pull request #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation
URL: https://github.com/apache/flink/pull/10694#discussion_r362365384
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/plan/metadata/FlinkRelMdCollation.java
 ##########
 @@ -0,0 +1,561 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.plan.metadata;
+
+import org.apache.calcite.adapter.enumerable.EnumerableCorrelate;
+import org.apache.calcite.adapter.enumerable.EnumerableHashJoin;
+import org.apache.calcite.adapter.enumerable.EnumerableMergeJoin;
+import org.apache.calcite.adapter.enumerable.EnumerableNestedLoopJoin;
+import org.apache.calcite.linq4j.Ord;
+import org.apache.calcite.plan.RelOptTable;
+import org.apache.calcite.plan.hep.HepRelVertex;
+import org.apache.calcite.plan.volcano.RelSubset;
+import org.apache.calcite.rel.RelCollation;
+import org.apache.calcite.rel.RelCollations;
+import org.apache.calcite.rel.RelFieldCollation;
+import org.apache.calcite.rel.RelNode;
+import org.apache.calcite.rel.core.Calc;
+import org.apache.calcite.rel.core.Filter;
+import org.apache.calcite.rel.core.Join;
+import org.apache.calcite.rel.core.JoinRelType;
+import org.apache.calcite.rel.core.Match;
+import org.apache.calcite.rel.core.Project;
+import org.apache.calcite.rel.core.Sort;
+import org.apache.calcite.rel.core.SortExchange;
+import org.apache.calcite.rel.core.TableModify;
+import org.apache.calcite.rel.core.TableScan;
+import org.apache.calcite.rel.core.Values;
+import org.apache.calcite.rel.core.Window;
+import org.apache.calcite.rel.metadata.BuiltInMetadata;
+import org.apache.calcite.rel.metadata.MetadataDef;
+import org.apache.calcite.rel.metadata.MetadataHandler;
+import org.apache.calcite.rel.metadata.ReflectiveRelMetadataProvider;
+import org.apache.calcite.rel.metadata.RelMetadataProvider;
+import org.apache.calcite.rel.metadata.RelMetadataQuery;
+import org.apache.calcite.rel.type.RelDataType;
+import org.apache.calcite.rex.RexCall;
+import org.apache.calcite.rex.RexCallBinding;
+import org.apache.calcite.rex.RexInputRef;
+import org.apache.calcite.rex.RexLiteral;
+import org.apache.calcite.rex.RexNode;
+import org.apache.calcite.rex.RexProgram;
+import org.apache.calcite.sql.validate.SqlMonotonicity;
+import org.apache.calcite.util.Bug;
+import org.apache.calcite.util.BuiltInMethod;
+import org.apache.calcite.util.ImmutableBitSet;
+import org.apache.calcite.util.ImmutableIntList;
+import org.apache.calcite.util.Pair;
+import org.apache.calcite.util.Util;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.SortedSet;
+import java.util.TreeSet;
+import java.util.stream.Collectors;
+
+/**
+ * FlinkRelMdCollation supplies a default implementation of
+ * {@link org.apache.calcite.rel.metadata.RelMetadataQuery#collations}
+ * for the standard logical algebra.
+ */
+public class FlinkRelMdCollation implements MetadataHandler<BuiltInMetadata.Collation> {
+	public static final RelMetadataProvider SOURCE =
+			ReflectiveRelMetadataProvider.reflectiveSource(BuiltInMethod.COLLATIONS.method, new FlinkRelMdCollation());
+
+	//~ Constructors -----------------------------------------------------------
+
+	private FlinkRelMdCollation() {
+	}
+
+	//~ Methods ----------------------------------------------------------------
+
+	public MetadataDef<BuiltInMetadata.Collation> getDef() {
+		return BuiltInMetadata.Collation.DEF;
+	}
+
+	public com.google.common.collect.ImmutableList<RelCollation> collations(TableScan scan, RelMetadataQuery mq) {
+		return com.google.common.collect.ImmutableList.copyOf(table(scan.getTable()));
+	}
+
+	public com.google.common.collect.ImmutableList<RelCollation> collations(Values values, RelMetadataQuery mq) {
+		return com.google.common.collect.ImmutableList.copyOf(values(mq, values.getRowType(), values.getTuples()));
+	}
+
+	public com.google.common.collect.ImmutableList<RelCollation> collations(Project project,
+			RelMetadataQuery mq) {
+		return com.google.common.collect.ImmutableList.copyOf(project(mq, project.getInput(), project.getProjects()));
+	}
+
+	public com.google.common.collect.ImmutableList<RelCollation> collations(Filter rel, RelMetadataQuery mq) {
+		return mq.collations(rel.getInput());
+	}
+
+	public com.google.common.collect.ImmutableList<RelCollation> collations(Calc calc, RelMetadataQuery mq) {
+		return com.google.common.collect.ImmutableList.copyOf(calc(mq, calc.getInput(), calc.getProgram()));
+	}
+
+	public com.google.common.collect.ImmutableList<RelCollation> collations(SortExchange sort, RelMetadataQuery mq) {
+		return com.google.common.collect.ImmutableList.copyOf(sort(sort.getCollation()));
+	}
+
+	public com.google.common.collect.ImmutableList<RelCollation> collations(Sort sort, RelMetadataQuery mq) {
+		return com.google.common.collect.ImmutableList.copyOf(sort(sort.getCollation()));
+	}
+
+	public com.google.common.collect.ImmutableList<RelCollation> collations(Window rel, RelMetadataQuery mq) {
+		return com.google.common.collect.ImmutableList.copyOf(window(mq, rel.getInput(), rel.groups));
+	}
+
+	public com.google.common.collect.ImmutableList<RelCollation> collations(
+			EnumerableCorrelate join,
+			RelMetadataQuery mq) {
+		return com.google.common.collect.ImmutableList.copyOf(
+				enumerableCorrelate(mq, join.getLeft(), join.getRight(), join.getJoinType()));
+	}
+
+	public com.google.common.collect.ImmutableList<RelCollation> collations(
+			EnumerableMergeJoin join,
+			RelMetadataQuery mq) {
+		// In general a join is not sorted. But a merge join preserves the sort
+		// order of the left and right sides.
+		return com.google.common.collect.ImmutableList.copyOf(mergeJoin(
+				mq,
+				join.getLeft(),
+				join.getRight(),
+				join.analyzeCondition().leftKeys,
+				join.analyzeCondition().rightKeys));
+	}
+
+	public com.google.common.collect.ImmutableList<RelCollation> collations(
+			EnumerableHashJoin join,
+			RelMetadataQuery mq) {
+		return com.google.common.collect.ImmutableList.copyOf(
+				enumerableHashJoin(mq, join.getLeft(), join.getRight(), join.getJoinType()));
+	}
+
+	public com.google.common.collect.ImmutableList<RelCollation> collations(
+			EnumerableNestedLoopJoin join,
+			RelMetadataQuery mq) {
+		return com.google.common.collect.ImmutableList.copyOf(
+				enumerableNestedLoopJoin(mq, join.getLeft(), join.getRight(), join.getJoinType()));
+	}
+
+	public com.google.common.collect.ImmutableList<RelCollation> collations(Match rel, RelMetadataQuery mq) {
+		return com.google.common.collect.ImmutableList.copyOf(match(
+				mq,
+				rel.getInput(),
+				rel.getRowType(),
+				rel.getPattern(),
+				rel.isStrictStart(),
+				rel.isStrictEnd(),
+				rel.getPatternDefinitions(),
+				rel.getMeasures(),
+				rel.getAfter(),
+				rel.getSubsets(),
+				rel.isAllRows(),
+				rel.getPartitionKeys(),
+				rel.getOrderKeys(),
+				rel.getInterval()));
+	}
+
+	public com.google.common.collect.ImmutableList<RelCollation> collations(TableModify rel, RelMetadataQuery mq) {
+		return mq.collations(rel.getInput());
+	}
+
+	public com.google.common.collect.ImmutableList<RelCollation> collations(HepRelVertex rel, RelMetadataQuery mq) {
+		return mq.collations(rel.getCurrentRel());
+	}
+
+	public com.google.common.collect.ImmutableList<RelCollation> collations(RelSubset subset, RelMetadataQuery mq) {
+		if (!Bug.CALCITE_1048_FIXED) {
+			//if the best node is null, so we can get the collation based original node, due to
+			//the original node is logically equivalent as the rel.
+			RelNode rel = Util.first(subset.getBest(), subset.getOriginal());
+			return mq.collations(rel);
+		} else {
+			throw new RuntimeException("CALCITE_1048 is fixed, so check this method again!");
 
 Review comment:
   It's unsafe to throw exception here. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation
URL: https://github.com/apache/flink/pull/10694#issuecomment-569001563
 
 
   <!--
   Meta data
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=3925 TriggerType:PUSH TriggerID:e9b4471c51446e144d7071480515be858959a352
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/142355379 TriggerType:PUSH TriggerID:e9b4471c51446e144d7071480515be858959a352
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/142355379 TriggerType:MANUAL TriggerID:569057856
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=3925 TriggerType:MANUAL TriggerID:569057856
   Hash:a37a0f82b4661edbaff69f873ef7c9a4cd460ed9 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/142833888 TriggerType:PUSH TriggerID:a37a0f82b4661edbaff69f873ef7c9a4cd460ed9
   Hash:a37a0f82b4661edbaff69f873ef7c9a4cd460ed9 Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4032 TriggerType:PUSH TriggerID:a37a0f82b4661edbaff69f873ef7c9a4cd460ed9
   Hash:7a59e4825ca9ce80b8d7562e426491e597a567d2 Status:PENDING URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4038 TriggerType:PUSH TriggerID:7a59e4825ca9ce80b8d7562e426491e597a567d2
   Hash:7a59e4825ca9ce80b8d7562e426491e597a567d2 Status:PENDING URL:https://travis-ci.com/flink-ci/flink/builds/142847507 TriggerType:PUSH TriggerID:7a59e4825ca9ce80b8d7562e426491e597a567d2
   -->
   ## CI report:
   
   * e9b4471c51446e144d7071480515be858959a352 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/142355379) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=3925) 
   * a37a0f82b4661edbaff69f873ef7c9a4cd460ed9 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/142833888) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4032) 
   * 7a59e4825ca9ce80b8d7562e426491e597a567d2 Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/142847507) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4038) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] godfreyhe edited a comment on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation

Posted by GitBox <gi...@apache.org>.
godfreyhe edited a comment on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation
URL: https://github.com/apache/flink/pull/10694#issuecomment-570124600
 
 
   > I'm agreed with you.
   > However it's unsafe to throw exception in the else branch.
   
   `FlinkRelMdUniqueKeys` and `FlinkRelMdUniqueGroups` also throw exception for this case and there are many test cases will fail once CALCITE_1048 is fixed

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation
URL: https://github.com/apache/flink/pull/10694#issuecomment-569001563
 
 
   <!--
   Meta data
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=3925 TriggerType:PUSH TriggerID:e9b4471c51446e144d7071480515be858959a352
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/142355379 TriggerType:PUSH TriggerID:e9b4471c51446e144d7071480515be858959a352
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/142355379 TriggerType:MANUAL TriggerID:569057856
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=3925 TriggerType:MANUAL TriggerID:569057856
   Hash:a37a0f82b4661edbaff69f873ef7c9a4cd460ed9 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/142833888 TriggerType:PUSH TriggerID:a37a0f82b4661edbaff69f873ef7c9a4cd460ed9
   Hash:a37a0f82b4661edbaff69f873ef7c9a4cd460ed9 Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4032 TriggerType:PUSH TriggerID:a37a0f82b4661edbaff69f873ef7c9a4cd460ed9
   -->
   ## CI report:
   
   * e9b4471c51446e144d7071480515be858959a352 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/142355379) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=3925) 
   * a37a0f82b4661edbaff69f873ef7c9a4cd460ed9 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/142833888) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4032) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation
URL: https://github.com/apache/flink/pull/10694#issuecomment-569001563
 
 
   <!--
   Meta data
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=3925 TriggerType:PUSH TriggerID:e9b4471c51446e144d7071480515be858959a352
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/142355379 TriggerType:PUSH TriggerID:e9b4471c51446e144d7071480515be858959a352
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:PENDING URL:https://travis-ci.com/flink-ci/flink/builds/142355379 TriggerType:MANUAL TriggerID:569057856
   -->
   ## CI report:
   
   * e9b4471c51446e144d7071480515be858959a352 Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/142355379) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=3925) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] godfreyhe commented on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation

Posted by GitBox <gi...@apache.org>.
godfreyhe commented on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation
URL: https://github.com/apache/flink/pull/10694#issuecomment-570124600
 
 
   > exception
   
   `FlinkRelMdUniqueKeys` and `FlinkRelMdUniqueGroups` also throw exception for this case and there are many test cases will fail once CALCITE_1048 is fixed

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] godfreyhe commented on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation

Posted by GitBox <gi...@apache.org>.
godfreyhe commented on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation
URL: https://github.com/apache/flink/pull/10694#issuecomment-570110015
 
 
   > @godfreyhe ,the fix makes sense.
   > However, it's better to fix the bug in Calcite.
   > Or Mark "The class should be removed after CALCITE-{JIARANUMBER} is fixed." in the header comment of the class.
   > What do you think?
   
   thanks for the suggestion @beyond1920 . Flink had rewritten most metadata handlers defined in Calcite. I think we should keep this class in order to support more `RelNode`s (many `RelNode`s can derive collation, like Rank). So I would like to add some comments in `public ImmutableList<RelCollation> collations(RelSubset subset, RelMetadataQuery mq)`  method instead of in the header of the class.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] godfreyhe commented on a change in pull request #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation

Posted by GitBox <gi...@apache.org>.
godfreyhe commented on a change in pull request #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation
URL: https://github.com/apache/flink/pull/10694#discussion_r361386657
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/plan/metadata/FlinkRelMdCollation.java
 ##########
 @@ -0,0 +1,557 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.planner.plan.metadata;
+
+import org.apache.calcite.adapter.enumerable.EnumerableCorrelate;
+import org.apache.calcite.adapter.enumerable.EnumerableHashJoin;
+import org.apache.calcite.adapter.enumerable.EnumerableMergeJoin;
+import org.apache.calcite.adapter.enumerable.EnumerableNestedLoopJoin;
+import org.apache.calcite.linq4j.Ord;
+import org.apache.calcite.plan.RelOptTable;
+import org.apache.calcite.plan.hep.HepRelVertex;
+import org.apache.calcite.plan.volcano.RelSubset;
+import org.apache.calcite.rel.RelCollation;
+import org.apache.calcite.rel.RelCollations;
+import org.apache.calcite.rel.RelFieldCollation;
+import org.apache.calcite.rel.RelNode;
+import org.apache.calcite.rel.core.Calc;
+import org.apache.calcite.rel.core.Filter;
+import org.apache.calcite.rel.core.Join;
+import org.apache.calcite.rel.core.JoinRelType;
+import org.apache.calcite.rel.core.Match;
+import org.apache.calcite.rel.core.Project;
+import org.apache.calcite.rel.core.Sort;
+import org.apache.calcite.rel.core.SortExchange;
+import org.apache.calcite.rel.core.TableModify;
+import org.apache.calcite.rel.core.TableScan;
+import org.apache.calcite.rel.core.Values;
+import org.apache.calcite.rel.core.Window;
+import org.apache.calcite.rel.metadata.BuiltInMetadata;
+import org.apache.calcite.rel.metadata.MetadataDef;
+import org.apache.calcite.rel.metadata.MetadataHandler;
+import org.apache.calcite.rel.metadata.ReflectiveRelMetadataProvider;
+import org.apache.calcite.rel.metadata.RelMetadataProvider;
+import org.apache.calcite.rel.metadata.RelMetadataQuery;
+import org.apache.calcite.rel.type.RelDataType;
+import org.apache.calcite.rex.RexCall;
+import org.apache.calcite.rex.RexCallBinding;
+import org.apache.calcite.rex.RexInputRef;
+import org.apache.calcite.rex.RexLiteral;
+import org.apache.calcite.rex.RexNode;
+import org.apache.calcite.rex.RexProgram;
+import org.apache.calcite.sql.validate.SqlMonotonicity;
+import org.apache.calcite.util.BuiltInMethod;
+import org.apache.calcite.util.ImmutableBitSet;
+import org.apache.calcite.util.ImmutableIntList;
+import org.apache.calcite.util.Pair;
+import org.apache.calcite.util.Util;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.SortedSet;
+import java.util.TreeSet;
+import java.util.stream.Collectors;
+
+/**
+ * FlinkRelMdCollation supplies a default implementation of
+ * {@link org.apache.calcite.rel.metadata.RelMetadataQuery#collations}
+ * for the standard logical algebra.
+ */
+public class FlinkRelMdCollation implements MetadataHandler<BuiltInMetadata.Collation> {
 
 Review comment:
   Most logic (except the part about RelSebset) is same with RelMdCollation. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] beyond1920 commented on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation

Posted by GitBox <gi...@apache.org>.
beyond1920 commented on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation
URL: https://github.com/apache/flink/pull/10694#issuecomment-570129426
 
 
   LGTM

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation
URL: https://github.com/apache/flink/pull/10694#issuecomment-569001563
 
 
   <!--
   Meta data
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=3925 TriggerType:PUSH TriggerID:e9b4471c51446e144d7071480515be858959a352
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/142355379 TriggerType:PUSH TriggerID:e9b4471c51446e144d7071480515be858959a352
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/142355379 TriggerType:MANUAL TriggerID:569057856
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=3925 TriggerType:MANUAL TriggerID:569057856
   Hash:a37a0f82b4661edbaff69f873ef7c9a4cd460ed9 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/142833888 TriggerType:PUSH TriggerID:a37a0f82b4661edbaff69f873ef7c9a4cd460ed9
   Hash:a37a0f82b4661edbaff69f873ef7c9a4cd460ed9 Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4032 TriggerType:PUSH TriggerID:a37a0f82b4661edbaff69f873ef7c9a4cd460ed9
   Hash:7a59e4825ca9ce80b8d7562e426491e597a567d2 Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:7a59e4825ca9ce80b8d7562e426491e597a567d2
   -->
   ## CI report:
   
   * e9b4471c51446e144d7071480515be858959a352 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/142355379) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=3925) 
   * a37a0f82b4661edbaff69f873ef7c9a4cd460ed9 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/142833888) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4032) 
   * 7a59e4825ca9ce80b8d7562e426491e597a567d2 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10694: [FLINK-15381] [table-planner-blink] correct collation derive logic on RelSubset in RelMdCollation
URL: https://github.com/apache/flink/pull/10694#issuecomment-569001563
 
 
   <!--
   Meta data
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=3925 TriggerType:PUSH TriggerID:e9b4471c51446e144d7071480515be858959a352
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/142355379 TriggerType:PUSH TriggerID:e9b4471c51446e144d7071480515be858959a352
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/142355379 TriggerType:MANUAL TriggerID:569057856
   Hash:e9b4471c51446e144d7071480515be858959a352 Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=3925 TriggerType:MANUAL TriggerID:569057856
   Hash:a37a0f82b4661edbaff69f873ef7c9a4cd460ed9 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/142833888 TriggerType:PUSH TriggerID:a37a0f82b4661edbaff69f873ef7c9a4cd460ed9
   Hash:a37a0f82b4661edbaff69f873ef7c9a4cd460ed9 Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4032 TriggerType:PUSH TriggerID:a37a0f82b4661edbaff69f873ef7c9a4cd460ed9
   Hash:7a59e4825ca9ce80b8d7562e426491e597a567d2 Status:PENDING URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4038 TriggerType:PUSH TriggerID:7a59e4825ca9ce80b8d7562e426491e597a567d2
   Hash:7a59e4825ca9ce80b8d7562e426491e597a567d2 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/142847507 TriggerType:PUSH TriggerID:7a59e4825ca9ce80b8d7562e426491e597a567d2
   -->
   ## CI report:
   
   * e9b4471c51446e144d7071480515be858959a352 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/142355379) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=3925) 
   * a37a0f82b4661edbaff69f873ef7c9a4cd460ed9 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/142833888) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4032) 
   * 7a59e4825ca9ce80b8d7562e426491e597a567d2 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/142847507) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4038) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services