You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "hanyuzheng7 (via GitHub)" <gi...@apache.org> on 2023/08/10 03:23:13 UTC

[GitHub] [flink] hanyuzheng7 opened a new pull request, #23190: [BP1.17][FLINK-32720][table] Add built-in GENERATE_SERIES function

hanyuzheng7 opened a new pull request, #23190:
URL: https://github.com/apache/flink/pull/23190

   ## What is the purpose of the change
   This is an implementation of GENERATE_SERIES
   
   
   ## Brief change log
   Constructs an array of values between start and end, inclusive.
   Parameters start and end can be an INT or BIGINT.
   step, if supplied, specifies the step size. The step can be positive or negative. If not supplied, step defaults to 1. Parameter step must be an INT.
   
   - Syntax
   ```
   GENERATE_SERIES(start, end)
   GENERATE_SERIES(start, end, step)
   ```
   
   - Arguments
   start: the beginning element of return array
   end: the ending element of return array
   step: the size of step
   
   - Returns
   return an array of values between start and end, inclusive.
   if any input arguments equal to null, return null.
   
   - Examples
   ```
   SELECT GENERATE_SERISE(1, 5);
   Result: [1,2,3,4,5]
   
   SELECT GENERATE_SERISE(0, 10, 2); 
   Result: [0, 2, 4, 6, 8, 10] 
   ```
   
   - See also
   
   1.PostgreSQL: PostgreSQL offers a function called generate_series which generates a set of contiguous integers from a start to an end value. An optional 'step' parameter is available to specify the increment between each integer.
   
   https://www.postgresql.org/docs/current/functions-srf.html
   
   2.ksqlDB: As you mentioned, ksqlDB provides a function called GENERATE_SERIES that generates a series of numbers, starting from a given start value, incrementing each time by a step value, until it reaches or exceeds a given end value.
   
   https://docs.ksqldb.io/en/latest/developer-guide/ksqldb-reference/scalar-functions/#generate_series
   
   3.BigQuery: BigQuery has a function called GENERATE_ARRAY that generates an array consisting of integers from the start value to the end value, with each integer incremented by the step value. You can find more details in the https://cloud.google.com/bigquery/docs/reference/standard-sql/array_functions#generate_array
   
   
   
   ## Verifying this change
   This change added tests in CollectionFunctionsITCase.
   
   ## Does this pull request potentially affect one of the following parts:  
     - Dependencies (does it add or upgrade a dependency): (yes / no)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (yes / no)
     - The serializers: (yes / no / don't know)
     - The runtime per-record code paths (performance sensitive): (yes / no / don't know)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / no / don't know)
     - The S3 file system connector: (yes / no / don't know)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (yes / no)
     - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
   


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

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

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


[GitHub] [flink] flinkbot commented on pull request #23190: [BP1.17][FLINK-32720][table] Add built-in GENERATE_SERIES function

Posted by "flinkbot (via GitHub)" <gi...@apache.org>.
flinkbot commented on PR #23190:
URL: https://github.com/apache/flink/pull/23190#issuecomment-1672499157

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


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

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

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


Re: [PR] [BP1.17][FLINK-32720][table] Add built-in GENERATE_SERIES function [flink]

Posted by "MartijnVisser (via GitHub)" <gi...@apache.org>.
MartijnVisser commented on PR #23190:
URL: https://github.com/apache/flink/pull/23190#issuecomment-1836227462

   Closing this PR since we don't backport new features into existing releases


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

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

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


Re: [PR] [BP1.17][FLINK-32720][table] Add built-in GENERATE_SERIES function [flink]

Posted by "MartijnVisser (via GitHub)" <gi...@apache.org>.
MartijnVisser closed pull request #23190: [BP1.17][FLINK-32720][table] Add built-in GENERATE_SERIES function
URL: https://github.com/apache/flink/pull/23190


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

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

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