zhangjun0x01 commented on a change in pull request #2229:
URL: https://github.com/apache/iceberg/pull/2229#discussion_r572633976



##########
File path: flink/src/test/java/org/apache/iceberg/flink/FlinkTestBase.java
##########
@@ -78,7 +79,9 @@ protected TableEnvironment getTableEnv() {
               .build();
 
           TableEnvironment env = TableEnvironment.create(settings);
-          
env.getConfig().getConfiguration().set(FlinkTableOptions.TABLE_EXEC_ICEBERG_INFER_SOURCE_PARALLELISM,
 false);
+          env.getConfig().getConfiguration()
+              
.set(FlinkTableOptions.TABLE_EXEC_ICEBERG_INFER_SOURCE_PARALLELISM, false)
+              .set(CoreOptions.DEFAULT_PARALLELISM, 1);

Review comment:
       the default parallelism of the new interface is not 1, It seems to be 
the number of cores of the current machine,If our current machine is 
multi-core, some test case will go wrong,for example. 
   there is a sql :
   `
   INSERT INTO mytest VALUES (1,'iceberg',10),(2,'b',20),(3,CAST(NULL AS 
VARCHAR),30)
   `
   it will write multiple files,if we use the sql `SELECT * FROM mytest LIMIT 
1` to query the table , the result is random ,not the first record , we  will 
can not do the assertion,  so I set the parallelism is 1 so that we don’t need 
to change too much code
   
   




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to