liyubin117 commented on code in PR #23810:
URL: https://github.com/apache/flink/pull/23810#discussion_r1410159149


##########
flink-table/flink-table-api-java-bridge/src/main/java/org/apache/flink/connector/datagen/table/DataGenConnectorOptionsUtil.java:
##########
@@ -34,6 +34,8 @@ public class DataGenConnectorOptionsUtil {
     public static final String MAX = "max";
     public static final String MAX_PAST = "max-past";
     public static final String LENGTH = "length";
+

Review Comment:
   thanks for your reminds, done :)



##########
flink-table/flink-table-api-java-bridge/src/main/java/org/apache/flink/connector/datagen/table/RandomGeneratorVisitor.java:
##########
@@ -503,10 +524,14 @@ private static RandomGenerator<byte[]> 
getRandomBytesGenerator(int length) {
         return new RandomGenerator<byte[]>() {
             @Override
             public byte[] next() {
-                byte[] arr = new byte[length];
+                byte[] arr = new byte[getVariableLengthFieldRealLen(length, 
varLen)];
                 random.getRandomGenerator().nextBytes(arr);
                 return arr;
             }
         };
     }
+
+    private static int getVariableLengthFieldRealLen(int length, boolean 
varLen) {

Review Comment:
   done



-- 
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-unsubscr...@flink.apache.org

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

Reply via email to