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 2020/07/08 11:09:08 UTC

[GitHub] [flink] twalthr opened a new pull request #12853: [FLINK-18524][table-common] Fix type inference for Scala varargs

twalthr opened a new pull request #12853:
URL: https://github.com/apache/flink/pull/12853


   ## What is the purpose of the change
   
   Fixes the type inference for Scala varargs.
   
   ## Brief change log
   
   See commit messages.
   
   ## Verifying this change
   
   This change added tests and can be verified as follows: `TypeInferenceExtractorScalaTest`
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): no
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`:  no
     - The serializers: no
     - The runtime per-record code paths (performance sensitive): no
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: no
     - The S3 file system connector: no
   
   ## Documentation
   
     - Does this pull request introduce a new feature? no
     - If yes, how is the feature documented? docs
   


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



[GitHub] [flink] twalthr commented on pull request #12853: [FLINK-18524][table-common] Fix type inference for Scala varargs

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


   Thanks @aljoscha. I will merge this once the build is green.


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



[GitHub] [flink] aljoscha commented on a change in pull request #12853: [FLINK-18524][table-common] Fix type inference for Scala varargs

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



##########
File path: flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/extraction/FunctionMappingExtractor.java
##########
@@ -174,6 +178,39 @@ boolean hasAccumulator() {
 		return collectedMappings;
 	}
 
+	/**
+	 * Special case for Scala which generates two methods when using var-args (a {@code Seq < String >}
+	 * and {@code String...}). This method searches for the Java-like variant.
+	 */
+	private static Method adjustMethod(Method method) {

Review comment:
       This could be called sth like `correctVarargMethod()` that describes what it does in the method name.




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



[GitHub] [flink] flinkbot commented on pull request #12853: [FLINK-18524][table-common] Fix type inference for Scala varargs

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


   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 dac055b0d95b136897bd699014290322c4dc22ce (Wed Jul 08 11:27:19 UTC 2020)
   
    ✅no warnings
   
   <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



[GitHub] [flink] flinkbot edited a comment on pull request #12853: [FLINK-18524][table-common] Fix type inference for Scala varargs

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "dac055b0d95b136897bd699014290322c4dc22ce",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=4339",
       "triggerID" : "dac055b0d95b136897bd699014290322c4dc22ce",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * dac055b0d95b136897bd699014290322c4dc22ce Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=4339) 
   
   <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



[GitHub] [flink] twalthr closed pull request #12853: [FLINK-18524][table-common] Fix type inference for Scala varargs

Posted by GitBox <gi...@apache.org>.
twalthr closed pull request #12853:
URL: https://github.com/apache/flink/pull/12853


   


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



[GitHub] [flink] flinkbot commented on pull request #12853: [FLINK-18524][table-common] Fix type inference for Scala varargs

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "dac055b0d95b136897bd699014290322c4dc22ce",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "dac055b0d95b136897bd699014290322c4dc22ce",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * dac055b0d95b136897bd699014290322c4dc22ce 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



[GitHub] [flink] flinkbot edited a comment on pull request #12853: [FLINK-18524][table-common] Fix type inference for Scala varargs

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "dac055b0d95b136897bd699014290322c4dc22ce",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=4339",
       "triggerID" : "dac055b0d95b136897bd699014290322c4dc22ce",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c7ca84b229988ddc46b9b7c110519b74785e10a4",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "c7ca84b229988ddc46b9b7c110519b74785e10a4",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * dac055b0d95b136897bd699014290322c4dc22ce Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=4339) 
   * c7ca84b229988ddc46b9b7c110519b74785e10a4 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



[GitHub] [flink] flinkbot edited a comment on pull request #12853: [FLINK-18524][table-common] Fix type inference for Scala varargs

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "dac055b0d95b136897bd699014290322c4dc22ce",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=4339",
       "triggerID" : "dac055b0d95b136897bd699014290322c4dc22ce",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c7ca84b229988ddc46b9b7c110519b74785e10a4",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=4346",
       "triggerID" : "c7ca84b229988ddc46b9b7c110519b74785e10a4",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * dac055b0d95b136897bd699014290322c4dc22ce Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=4339) 
   * c7ca84b229988ddc46b9b7c110519b74785e10a4 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=4346) 
   
   <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