aokolnychyi commented on a change in pull request #2087:
URL: https://github.com/apache/iceberg/pull/2087#discussion_r558409725
##########
File path:
spark3/src/test/java/org/apache/iceberg/actions/TestCreateActions.java
##########
@@ -296,14 +406,25 @@ private void createSourceTable(String createStatement,
String tableName)
private void assertMigratedFileCount(CreateAction migrateAction, String
source, String dest)
throws NoSuchTableException, NoSuchDatabaseException, ParseException {
CatalogTable sourceTable = loadSessionTable(source);
- Path sourceDir = Paths.get(sourceTable.location());
- List<File> files = FileUtils.listFiles(sourceDir.toFile(),
TrueFileFilter.INSTANCE, TrueFileFilter.INSTANCE)
- .stream()
- .filter(file -> !file.toString().endsWith("crc") &&
!file.toString().contains("_SUCCESS"))
- .collect(Collectors.toList());
- long expectedMigratedFiles = files.size();
- List<Row> expected = spark.table(source).collectAsList();
+ List<URI> uris;
+ if (sourceTable.partitionColumnNames().size() == 0) {
+ uris = new ArrayList<>();
+ uris.add(sourceTable.location());
+ } else {
+ Seq<CatalogTablePartition> catalogTablePartitionSeq =
+
spark.sessionState().catalog().listPartitions(sourceTable.identifier(),
Option.apply(null));
Review comment:
should be formatted with 4 spaces instead of 8.
----------------------------------------------------------------
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]