You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "reswqa (via GitHub)" <gi...@apache.org> on 2025/04/10 09:17:47 UTC

[PR] [FLINK-37649][datagen] Datagen connector cannot set length for collection type [flink]

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

   ## What is the purpose of the change
   
   *Fix the bug that datagen connector cannot set length for collection type.*
   
   
   ## Brief change log
   
     - *Add `lenOption` to the legitimate set of options*.
   
   
   ## Verifying this change
   
   Introduce a unit test case to cover this.
   
   ## 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, ZooKeeper: no
     - The S3 file system connector: no
   
   ## Documentation
   
     - Does this pull request introduce a new feature? no
   


-- 
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] [FLINK-37649][datagen] Datagen connector cannot set length for collection type [flink]

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

   > I wonder if we should add the test case mentioned in the Jira to the datagen docs as an example WDYT?
   
   @davidradl The documentation indeed is not very friendly especially when it does not mention some of the supported features(e.g. `fields.xxx.element/key/value.yyy` for nested type). I'm inclined that we should rewrite/refactor it, but there's not much bandwidth for me at the moment . If you'd like to update it, I'd be happy to review it :).


-- 
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] [FLINK-37649][datagen] Datagen connector cannot set length for collection type [flink]

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

   @reswqa thanks I can improve the docs.  I have raised a [Jira](https://issues.apache.org/jira/browse/FLINK-37658) . Please could you assign me the Jira, thanks :-)   


-- 
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] [FLINK-37649][datagen] Datagen connector cannot set length for collection type [flink]

Posted by "davidradl (via GitHub)" <gi...@apache.org>.
davidradl commented on code in PR #26437:
URL: https://github.com/apache/flink/pull/26437#discussion_r2037400286


##########
flink-table/flink-table-api-java-bridge/src/test/java/org/apache/flink/table/factories/DataGenTableSourceFactoryTest.java:
##########
@@ -347,6 +352,31 @@ void testVariableLengthDataType() throws Exception {
                 "Custom length '21' for variable-length type (VARCHAR/STRING/VARBINARY/BYTES) field 'f3' should be shorter than '20' defined in the schema.");
     }
 
+    @Test
+    void testLengthForCollectionType() throws Exception {
+        DescriptorProperties descriptor = new DescriptorProperties();

Review Comment:
   Could we have a test that tests the default is working a well, when the length is not explicitly set.  



-- 
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] [FLINK-37649][datagen] Datagen connector cannot set length for collection type [flink]

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

   I wonder if we should add the test case mentioned in the Jira to the datagen docs as an example WDYT?   


-- 
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] [FLINK-37649][datagen] Datagen connector cannot set length for collection type [flink]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "01c92d76e89902744deecbc8525ef968dd76e95a",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "01c92d76e89902744deecbc8525ef968dd76e95a",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 01c92d76e89902744deecbc8525ef968dd76e95a 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] [FLINK-37649][datagen] Datagen connector cannot set length for collection type [flink]

Posted by "reswqa (via GitHub)" <gi...@apache.org>.
reswqa merged PR #26437:
URL: https://github.com/apache/flink/pull/26437


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