You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by bl...@apache.org on 2020/01/15 17:18:35 UTC
[incubator-iceberg] branch master updated: Remove warnings from the
build (#722)
This is an automated email from the ASF dual-hosted git repository.
blue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-iceberg.git
The following commit(s) were added to refs/heads/master by this push:
new 949c6a9 Remove warnings from the build (#722)
949c6a9 is described below
commit 949c6a98ac80acec10568070772082c1178eb739
Author: Fokko Driesprong <fo...@apache.org>
AuthorDate: Wed Jan 15 18:18:29 2020 +0100
Remove warnings from the build (#722)
---
.../java/org/apache/iceberg/types/CheckCompatibility.java | 14 ++++++--------
.../java/org/apache/iceberg/parquet/ParquetFilters.java | 15 ++++-----------
2 files changed, 10 insertions(+), 19 deletions(-)
diff --git a/api/src/main/java/org/apache/iceberg/types/CheckCompatibility.java b/api/src/main/java/org/apache/iceberg/types/CheckCompatibility.java
index 89ea1b0..7b53412 100644
--- a/api/src/main/java/org/apache/iceberg/types/CheckCompatibility.java
+++ b/api/src/main/java/org/apache/iceberg/types/CheckCompatibility.java
@@ -130,7 +130,7 @@ public class CheckCompatibility extends TypeUtil.CustomOrderSchemaVisitor<List<S
}
}
- return errors;
+ return ImmutableList.copyOf(errors);
}
@Override
@@ -163,8 +163,7 @@ public class CheckCompatibility extends TypeUtil.CustomOrderSchemaVisitor<List<S
}
}
- return errors;
-
+ return ImmutableList.copyOf(errors);
} finally {
this.currentType = struct;
}
@@ -187,15 +186,15 @@ public class CheckCompatibility extends TypeUtil.CustomOrderSchemaVisitor<List<S
errors.addAll(elementErrors.get());
- return errors;
-
+ return ImmutableList.copyOf(errors);
} finally {
this.currentType = list;
}
}
@Override
- public List<String> map(Types.MapType readMap, Supplier<List<String>> keyErrors, Supplier<List<String>> valueErrors) {
+ public List<String> map(
+ Types.MapType readMap, Supplier<List<String>> keyErrors, Supplier<List<String>> valueErrors) {
if (!currentType.isMapType()) {
return ImmutableList.of(String.format(": %s cannot be read as a map", currentType));
}
@@ -214,8 +213,7 @@ public class CheckCompatibility extends TypeUtil.CustomOrderSchemaVisitor<List<S
this.currentType = map.valueType();
errors.addAll(valueErrors.get());
- return errors;
-
+ return ImmutableList.copyOf(errors);
} finally {
this.currentType = map;
}
diff --git a/parquet/src/main/java/org/apache/iceberg/parquet/ParquetFilters.java b/parquet/src/main/java/org/apache/iceberg/parquet/ParquetFilters.java
index 7a2f03b..d3e3df3 100644
--- a/parquet/src/main/java/org/apache/iceberg/parquet/ParquetFilters.java
+++ b/parquet/src/main/java/org/apache/iceberg/parquet/ParquetFilters.java
@@ -136,29 +136,22 @@ class ParquetFilters {
case NOT_EQ:
return FilterApi.notEq(col, getParquetPrimitive(lit));
}
-
+ break;
case INTEGER:
+ case DATE:
return pred(op, FilterApi.intColumn(path), getParquetPrimitive(lit));
case LONG:
+ case TIME:
+ case TIMESTAMP:
return pred(op, FilterApi.longColumn(path), getParquetPrimitive(lit));
case FLOAT:
return pred(op, FilterApi.floatColumn(path), getParquetPrimitive(lit));
case DOUBLE:
return pred(op, FilterApi.doubleColumn(path), getParquetPrimitive(lit));
- case DATE:
- return pred(op, FilterApi.intColumn(path), getParquetPrimitive(lit));
- case TIME:
- return pred(op, FilterApi.longColumn(path), getParquetPrimitive(lit));
- case TIMESTAMP:
- return pred(op, FilterApi.longColumn(path), getParquetPrimitive(lit));
case STRING:
- return pred(op, FilterApi.binaryColumn(path), getParquetPrimitive(lit));
case UUID:
- return pred(op, FilterApi.binaryColumn(path), getParquetPrimitive(lit));
case FIXED:
- return pred(op, FilterApi.binaryColumn(path), getParquetPrimitive(lit));
case BINARY:
- return pred(op, FilterApi.binaryColumn(path), getParquetPrimitive(lit));
case DECIMAL:
return pred(op, FilterApi.binaryColumn(path), getParquetPrimitive(lit));
}