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/02/21 09:27:07 UTC

[GitHub] [flink] dawidwys opened a new pull request #11170: [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.

dawidwys opened a new pull request #11170:  [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.
URL: https://github.com/apache/flink/pull/11170
 
 
   ## What is the purpose of the change
   
   First of all it fixes the fact that we were loosing function identifier within the expression resolution stack.
   
   Second of all it lets users use catalog functions in scala's expression DSL.
   
   It is based on #11156
   
   ## Verifying this change
   
   This change is already covered by existing tests, which were also updated.
   
   ## 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 commented on issue #11170: [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #11170:  [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.
URL: https://github.com/apache/flink/pull/11170#issuecomment-589572782
 
 
   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 2c85988d5f5074372ff5363164ebfe0244d0dc57 (Fri Feb 21 09:30:12 UTC 2020)
   
   **Warnings:**
    * Documentation files were touched, but no `.zh.md` files: Update Chinese documentation or file Jira ticket.
   
   
   <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 commented on issue #11170: [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #11170:  [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.
URL: https://github.com/apache/flink/pull/11170#issuecomment-589590759
 
 
   <!--
   Meta data
   Hash:2c85988d5f5074372ff5363164ebfe0244d0dc57 Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:2c85988d5f5074372ff5363164ebfe0244d0dc57
   -->
   ## CI report:
   
   * 2c85988d5f5074372ff5363164ebfe0244d0dc57 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] dawidwys merged pull request #11170: [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.

Posted by GitBox <gi...@apache.org>.
dawidwys merged pull request #11170:  [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.
URL: https://github.com/apache/flink/pull/11170
 
 
   

----------------------------------------------------------------
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 #11170: [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11170:  [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.
URL: https://github.com/apache/flink/pull/11170#issuecomment-589590759
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "e13785504108e6e6373e30df43d245a6b47bb1ce",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5405",
       "triggerID" : "e13785504108e6e6373e30df43d245a6b47bb1ce",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e13785504108e6e6373e30df43d245a6b47bb1ce",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/149970692",
       "triggerID" : "e13785504108e6e6373e30df43d245a6b47bb1ce",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6b38701e19f3818b2336f247d5bf183ee48b5abe",
       "status" : "CANCELED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150320858",
       "triggerID" : "6b38701e19f3818b2336f247d5bf183ee48b5abe",
       "triggerType" : "PUSH"
     }, {
       "hash" : "65c4ef141c744fd8a51b17c02861225370f08a79",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "65c4ef141c744fd8a51b17c02861225370f08a79",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 6b38701e19f3818b2336f247d5bf183ee48b5abe Travis: [CANCELED](https://travis-ci.com/flink-ci/flink/builds/150320858) 
   * 65c4ef141c744fd8a51b17c02861225370f08a79 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] twalthr commented on a change in pull request #11170: [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.

Posted by GitBox <gi...@apache.org>.
twalthr commented on a change in pull request #11170:  [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.
URL: https://github.com/apache/flink/pull/11170#discussion_r383221993
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/calcite/FlinkRelBuilder.scala
 ##########
 @@ -59,7 +59,7 @@ class FlinkRelBuilder(
 
   private val toRelNodeConverter = {
     val functionCatalog = context.unwrap(classOf[FlinkContext]).getFunctionCatalog
 
 Review comment:
   remove local variable

----------------------------------------------------------------
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 #11170: [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11170:  [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.
URL: https://github.com/apache/flink/pull/11170#issuecomment-589590759
 
 
   <!--
   Meta data
   Hash:2c85988d5f5074372ff5363164ebfe0244d0dc57 Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:2c85988d5f5074372ff5363164ebfe0244d0dc57
   Hash:e13785504108e6e6373e30df43d245a6b47bb1ce Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5405 TriggerType:PUSH TriggerID:e13785504108e6e6373e30df43d245a6b47bb1ce
   Hash:e13785504108e6e6373e30df43d245a6b47bb1ce Status:PENDING URL:https://travis-ci.com/flink-ci/flink/builds/149970692 TriggerType:PUSH TriggerID:e13785504108e6e6373e30df43d245a6b47bb1ce
   -->
   ## CI report:
   
   * 2c85988d5f5074372ff5363164ebfe0244d0dc57 UNKNOWN
   * e13785504108e6e6373e30df43d245a6b47bb1ce Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/149970692) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5405) 
   
   <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] twalthr commented on a change in pull request #11170: [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.

Posted by GitBox <gi...@apache.org>.
twalthr commented on a change in pull request #11170:  [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.
URL: https://github.com/apache/flink/pull/11170#discussion_r383224973
 
 

 ##########
 File path: flink-table/flink-table-api-scala/src/main/scala/org/apache/flink/table/api/expressionDsl.scala
 ##########
 @@ -1257,6 +1257,38 @@ trait ImplicitExpressionConversions {
     convertArray(array)
   }
 
+  // ----------------------------------------------------------------------------------------------
+  // Function calls
+  // ----------------------------------------------------------------------------------------------
+
+  /**
+   * A call to a function that will be looked up in a catalog. There are two kinds of functions:
+   *
+   *  - System functions - which are identified with one part names
+   *  - Catalog functions - which are identified always with three parts names
+   *    (catalog, database, function)
+   *
+   * Moreover each function can either be a temporary function or permanent one
+   * (which is stored in an external catalog).
+   *
+   * Based on that two properties the resolution order for looking up a function based on
+   * the provided `functionName` is following:
 
 Review comment:
   ```
   Based on those two properties, the resolution order for looking up a function based on the provided path is as follows:
   ```

----------------------------------------------------------------
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 #11170: [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11170:  [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.
URL: https://github.com/apache/flink/pull/11170#issuecomment-589590759
 
 
   <!--
   Meta data
   Hash:2c85988d5f5074372ff5363164ebfe0244d0dc57 Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:2c85988d5f5074372ff5363164ebfe0244d0dc57
   Hash:e13785504108e6e6373e30df43d245a6b47bb1ce Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:e13785504108e6e6373e30df43d245a6b47bb1ce
   -->
   ## CI report:
   
   * 2c85988d5f5074372ff5363164ebfe0244d0dc57 UNKNOWN
   * e13785504108e6e6373e30df43d245a6b47bb1ce 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] twalthr commented on a change in pull request #11170: [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.

Posted by GitBox <gi...@apache.org>.
twalthr commented on a change in pull request #11170:  [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.
URL: https://github.com/apache/flink/pull/11170#discussion_r383212202
 
 

 ##########
 File path: flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/ExpressionResolver.java
 ##########
 @@ -382,11 +395,13 @@ public CallExpression get(ResolvedExpression composite, ValueLiteralExpression k
 		private ExpressionResolverBuilder(
 				QueryOperation[] queryOperations,
 				TableConfig config,
+				Function<String, UnresolvedIdentifier> identifierParser,
 				TableReferenceLookup tableCatalog,
 				FunctionLookup functionLookup,
 				DataTypeFactory typeFactory) {
 			this.config = config;
 			this.queryOperations = Arrays.asList(queryOperations);
+			this.identifierParser = identifierParser;
 
 Review comment:
   How about we integrate the `identifierParser` into `FunctionLookup`. `DataTypeFactory` has also a method that takes `(String)`. I would like to reduce the number of instances that we need to pass around.

----------------------------------------------------------------
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 #11170: [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11170:  [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.
URL: https://github.com/apache/flink/pull/11170#issuecomment-589590759
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "e13785504108e6e6373e30df43d245a6b47bb1ce",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5405",
       "triggerID" : "e13785504108e6e6373e30df43d245a6b47bb1ce",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e13785504108e6e6373e30df43d245a6b47bb1ce",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/149970692",
       "triggerID" : "e13785504108e6e6373e30df43d245a6b47bb1ce",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6b38701e19f3818b2336f247d5bf183ee48b5abe",
       "status" : "CANCELED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150320858",
       "triggerID" : "6b38701e19f3818b2336f247d5bf183ee48b5abe",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 6b38701e19f3818b2336f247d5bf183ee48b5abe Travis: [CANCELED](https://travis-ci.com/flink-ci/flink/builds/150320858) 
   
   <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 #11170: [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11170:  [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.
URL: https://github.com/apache/flink/pull/11170#issuecomment-589590759
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "e13785504108e6e6373e30df43d245a6b47bb1ce",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5405",
       "triggerID" : "e13785504108e6e6373e30df43d245a6b47bb1ce",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e13785504108e6e6373e30df43d245a6b47bb1ce",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/149970692",
       "triggerID" : "e13785504108e6e6373e30df43d245a6b47bb1ce",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * e13785504108e6e6373e30df43d245a6b47bb1ce Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/149970692) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5405) 
   
   <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] twalthr commented on a change in pull request #11170: [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.

Posted by GitBox <gi...@apache.org>.
twalthr commented on a change in pull request #11170:  [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.
URL: https://github.com/apache/flink/pull/11170#discussion_r383223780
 
 

 ##########
 File path: flink-table/flink-table-api-scala/src/main/scala/org/apache/flink/table/api/expressionDsl.scala
 ##########
 @@ -1257,6 +1257,38 @@ trait ImplicitExpressionConversions {
     convertArray(array)
   }
 
+  // ----------------------------------------------------------------------------------------------
+  // Function calls
+  // ----------------------------------------------------------------------------------------------
+
+  /**
+   * A call to a function that will be looked up in a catalog. There are two kinds of functions:
+   *
+   *  - System functions - which are identified with one part names
+   *  - Catalog functions - which are identified always with three parts names
+   *    (catalog, database, function)
+   *
+   * Moreover each function can either be a temporary function or permanent one
+   * (which is stored in an external catalog).
 
 Review comment:
   remove "external"?

----------------------------------------------------------------
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] dawidwys commented on a change in pull request #11170: [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.

Posted by GitBox <gi...@apache.org>.
dawidwys commented on a change in pull request #11170:  [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.
URL: https://github.com/apache/flink/pull/11170#discussion_r383234266
 
 

 ##########
 File path: flink-table/flink-table-api-scala/src/main/scala/org/apache/flink/table/api/expressionDsl.scala
 ##########
 @@ -1257,6 +1257,38 @@ trait ImplicitExpressionConversions {
     convertArray(array)
   }
 
+  // ----------------------------------------------------------------------------------------------
+  // Function calls
+  // ----------------------------------------------------------------------------------------------
+
+  /**
+   * A call to a function that will be looked up in a catalog. There are two kinds of functions:
+   *
+   *  - System functions - which are identified with one part names
+   *  - Catalog functions - which are identified always with three parts names
+   *    (catalog, database, function)
+   *
+   * Moreover each function can either be a temporary function or permanent one
+   * (which is stored in an external catalog).
+   *
+   * Based on that two properties the resolution order for looking up a function based on
+   * the provided `functionName` is following:
+   *
+   *  - Temporary system function
+   *  - System function
+   *  - Temporary catalog function
+   *  - Catalog function
+   *
+   *
+   * @see TableEnvironment#useCatalog(String)
+   * @see TableEnvironment#useDatabase(String)
+   * @see TableEnvironment#createTemporaryFunction
+   * @see TableEnvironment#createTemporarySystemFunction
+   */
+  def call(path: String, params: Expression*): Expression = {
 
 Review comment:
   Yes, it is already part of the next PR. In this one I wanted to solve only the parsing issues. I needed to add this one method to fix tests.

----------------------------------------------------------------
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 #11170: [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11170:  [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.
URL: https://github.com/apache/flink/pull/11170#issuecomment-589590759
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "e13785504108e6e6373e30df43d245a6b47bb1ce",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5405",
       "triggerID" : "e13785504108e6e6373e30df43d245a6b47bb1ce",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e13785504108e6e6373e30df43d245a6b47bb1ce",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/149970692",
       "triggerID" : "e13785504108e6e6373e30df43d245a6b47bb1ce",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6b38701e19f3818b2336f247d5bf183ee48b5abe",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "6b38701e19f3818b2336f247d5bf183ee48b5abe",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * e13785504108e6e6373e30df43d245a6b47bb1ce Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/149970692) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5405) 
   * 6b38701e19f3818b2336f247d5bf183ee48b5abe 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] twalthr commented on a change in pull request #11170: [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.

Posted by GitBox <gi...@apache.org>.
twalthr commented on a change in pull request #11170:  [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.
URL: https://github.com/apache/flink/pull/11170#discussion_r383225064
 
 

 ##########
 File path: flink-table/flink-table-api-scala/src/main/scala/org/apache/flink/table/api/expressionDsl.scala
 ##########
 @@ -1257,6 +1257,38 @@ trait ImplicitExpressionConversions {
     convertArray(array)
   }
 
+  // ----------------------------------------------------------------------------------------------
+  // Function calls
+  // ----------------------------------------------------------------------------------------------
+
+  /**
+   * A call to a function that will be looked up in a catalog. There are two kinds of functions:
+   *
+   *  - System functions - which are identified with one part names
+   *  - Catalog functions - which are identified always with three parts names
+   *    (catalog, database, function)
+   *
+   * Moreover each function can either be a temporary function or permanent one
+   * (which is stored in an external catalog).
+   *
+   * Based on that two properties the resolution order for looking up a function based on
+   * the provided `functionName` is following:
+   *
+   *  - Temporary system function
+   *  - System function
+   *  - Temporary catalog function
+   *  - Catalog function
+   *
+   *
 
 Review comment:
   nit: remove double empty line

----------------------------------------------------------------
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 #11170: [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11170:  [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.
URL: https://github.com/apache/flink/pull/11170#issuecomment-589590759
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "e13785504108e6e6373e30df43d245a6b47bb1ce",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5405",
       "triggerID" : "e13785504108e6e6373e30df43d245a6b47bb1ce",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e13785504108e6e6373e30df43d245a6b47bb1ce",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/149970692",
       "triggerID" : "e13785504108e6e6373e30df43d245a6b47bb1ce",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6b38701e19f3818b2336f247d5bf183ee48b5abe",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150320858",
       "triggerID" : "6b38701e19f3818b2336f247d5bf183ee48b5abe",
       "triggerType" : "PUSH"
     }, {
       "hash" : "65c4ef141c744fd8a51b17c02861225370f08a79",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "65c4ef141c744fd8a51b17c02861225370f08a79",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * e13785504108e6e6373e30df43d245a6b47bb1ce Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/149970692) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5405) 
   * 6b38701e19f3818b2336f247d5bf183ee48b5abe Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/150320858) 
   * 65c4ef141c744fd8a51b17c02861225370f08a79 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] twalthr commented on a change in pull request #11170: [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.

Posted by GitBox <gi...@apache.org>.
twalthr commented on a change in pull request #11170:  [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.
URL: https://github.com/apache/flink/pull/11170#discussion_r383225484
 
 

 ##########
 File path: flink-table/flink-table-api-scala/src/main/scala/org/apache/flink/table/api/expressionDsl.scala
 ##########
 @@ -1257,6 +1257,38 @@ trait ImplicitExpressionConversions {
     convertArray(array)
   }
 
+  // ----------------------------------------------------------------------------------------------
+  // Function calls
+  // ----------------------------------------------------------------------------------------------
+
+  /**
+   * A call to a function that will be looked up in a catalog. There are two kinds of functions:
+   *
+   *  - System functions - which are identified with one part names
+   *  - Catalog functions - which are identified always with three parts names
+   *    (catalog, database, function)
+   *
+   * Moreover each function can either be a temporary function or permanent one
+   * (which is stored in an external catalog).
+   *
+   * Based on that two properties the resolution order for looking up a function based on
+   * the provided `functionName` is following:
+   *
+   *  - Temporary system function
+   *  - System function
+   *  - Temporary catalog function
+   *  - Catalog function
+   *
+   *
+   * @see TableEnvironment#useCatalog(String)
+   * @see TableEnvironment#useDatabase(String)
+   * @see TableEnvironment#createTemporaryFunction
+   * @see TableEnvironment#createTemporarySystemFunction
+   */
+  def call(path: String, params: Expression*): Expression = {
 
 Review comment:
   Should we also offer `call(function: FunctionDefinition, ...)` or at least `call(function: UserDefinedFunction, ...)`?

----------------------------------------------------------------
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 #11170: [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11170:  [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.
URL: https://github.com/apache/flink/pull/11170#issuecomment-589590759
 
 
   <!--
   Meta data
   Hash:2c85988d5f5074372ff5363164ebfe0244d0dc57 Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:2c85988d5f5074372ff5363164ebfe0244d0dc57
   Hash:e13785504108e6e6373e30df43d245a6b47bb1ce Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5405 TriggerType:PUSH TriggerID:e13785504108e6e6373e30df43d245a6b47bb1ce
   Hash:e13785504108e6e6373e30df43d245a6b47bb1ce Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/149970692 TriggerType:PUSH TriggerID:e13785504108e6e6373e30df43d245a6b47bb1ce
   -->
   ## CI report:
   
   * 2c85988d5f5074372ff5363164ebfe0244d0dc57 UNKNOWN
   * e13785504108e6e6373e30df43d245a6b47bb1ce Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/149970692) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5405) 
   
   <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 #11170: [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11170:  [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.
URL: https://github.com/apache/flink/pull/11170#issuecomment-589590759
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "e13785504108e6e6373e30df43d245a6b47bb1ce",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5405",
       "triggerID" : "e13785504108e6e6373e30df43d245a6b47bb1ce",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e13785504108e6e6373e30df43d245a6b47bb1ce",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/149970692",
       "triggerID" : "e13785504108e6e6373e30df43d245a6b47bb1ce",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6b38701e19f3818b2336f247d5bf183ee48b5abe",
       "status" : "CANCELED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/150320858",
       "triggerID" : "6b38701e19f3818b2336f247d5bf183ee48b5abe",
       "triggerType" : "PUSH"
     }, {
       "hash" : "65c4ef141c744fd8a51b17c02861225370f08a79",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "65c4ef141c744fd8a51b17c02861225370f08a79",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 6b38701e19f3818b2336f247d5bf183ee48b5abe Travis: [CANCELED](https://travis-ci.com/flink-ci/flink/builds/150320858) 
   * 65c4ef141c744fd8a51b17c02861225370f08a79 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 #11170: [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11170:  [FLINK-16033][table-api] Expose catalog lookup function calls in Scala's expression dsl.
URL: https://github.com/apache/flink/pull/11170#issuecomment-589590759
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "2c85988d5f5074372ff5363164ebfe0244d0dc57",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "2c85988d5f5074372ff5363164ebfe0244d0dc57",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e13785504108e6e6373e30df43d245a6b47bb1ce",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5405",
       "triggerID" : "e13785504108e6e6373e30df43d245a6b47bb1ce",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e13785504108e6e6373e30df43d245a6b47bb1ce",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/149970692",
       "triggerID" : "e13785504108e6e6373e30df43d245a6b47bb1ce",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 2c85988d5f5074372ff5363164ebfe0244d0dc57 UNKNOWN
   * e13785504108e6e6373e30df43d245a6b47bb1ce Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/149970692) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5405) 
   
   <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