You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "RussellSpitzer (via GitHub)" <gi...@apache.org> on 2026/03/10 01:54:51 UTC
[PR] Core, Flink, Spark: Deprecate Manifest read methods which rely manifest Metadata [iceberg]
RussellSpitzer opened a new pull request, #15575:
URL: https://github.com/apache/iceberg/pull/15575
Similar to #15241, this deprecates the ManifestFiles methods that rely on reading partition specs from manifest file metadata.
This prepares for future integrations which use the internal reader api which does not have access to the file metadata or files which do not have metadata. Specifically this is for our Parquet Manifests works in Table Spec V4
Deprecate read(ManifestFile, FileIO) in favor of read(ManifestFile, FileIO, Map)
- Deprecate readPaths(ManifestFile, FileIO) in favor of readPaths(ManifestFile, FileIO, Map)
- Deprecate package-private open(ManifestFile, FileIO)
- Add LOG.warn when specsById is null to surface the deprecated code path
- Migrate all internal callers and tests to pass specsById explicitly
--
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@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Core, Flink, Spark: Deprecate Manifest read methods which rely manifest Metadata [iceberg]
Posted by "pvary (via GitHub)" <gi...@apache.org>.
pvary commented on code in PR #15575:
URL: https://github.com/apache/iceberg/pull/15575#discussion_r2910184301
##########
core/src/main/java/org/apache/iceberg/ManifestFiles.java:
##########
@@ -97,14 +97,30 @@ public static CacheMetricsReport contentCacheStats(FileIO io) {
*
* @param manifest a ManifestFile
* @param io a FileIO
+ * @param specsById a Map from spec ID to partition spec
* @return a manifest reader
*/
- public static CloseableIterable<String> readPaths(ManifestFile manifest, FileIO io) {
+ public static CloseableIterable<String> readPaths(
+ ManifestFile manifest, FileIO io, Map<Integer, PartitionSpec> specsById) {
return CloseableIterable.transform(
- read(manifest, io, null).select(ImmutableList.of("file_path")).liveEntries(),
+ read(manifest, io, specsById).select(ImmutableList.of("file_path")).liveEntries(),
entry -> entry.file().location());
}
+ /**
+ * Returns a {@link CloseableIterable} of file paths in the {@link ManifestFile}.
+ *
+ * @param manifest a ManifestFile
+ * @param io a FileIO
+ * @return a manifest reader
+ * @deprecated since 1.11.0, will be removed in 2.0.0; use {@link #readPaths(ManifestFile, FileIO,
Review Comment:
This is core, so theoretically we could remove them in 1.12.0.
--
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@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Core, Flink, Spark: Deprecate Manifest read methods which rely manifest Metadata [iceberg]
Posted by "RussellSpitzer (via GitHub)" <gi...@apache.org>.
RussellSpitzer commented on PR #15575:
URL: https://github.com/apache/iceberg/pull/15575#issuecomment-4042158952
Thanks for review @pvary @singhpk234 @stevenzwu and @huaxingao ! Merged
--
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@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Core, Flink, Spark: Deprecate Manifest read methods which rely manifest Metadata [iceberg]
Posted by "RussellSpitzer (via GitHub)" <gi...@apache.org>.
RussellSpitzer commented on code in PR #15575:
URL: https://github.com/apache/iceberg/pull/15575#discussion_r2913201851
##########
core/src/main/java/org/apache/iceberg/ManifestFiles.java:
##########
@@ -97,14 +97,30 @@ public static CacheMetricsReport contentCacheStats(FileIO io) {
*
* @param manifest a ManifestFile
* @param io a FileIO
+ * @param specsById a Map from spec ID to partition spec
* @return a manifest reader
*/
- public static CloseableIterable<String> readPaths(ManifestFile manifest, FileIO io) {
+ public static CloseableIterable<String> readPaths(
+ ManifestFile manifest, FileIO io, Map<Integer, PartitionSpec> specsById) {
return CloseableIterable.transform(
- read(manifest, io, null).select(ImmutableList.of("file_path")).liveEntries(),
+ read(manifest, io, specsById).select(ImmutableList.of("file_path")).liveEntries(),
entry -> entry.file().location());
}
+ /**
+ * Returns a {@link CloseableIterable} of file paths in the {@link ManifestFile}.
+ *
+ * @param manifest a ManifestFile
+ * @param io a FileIO
+ * @return a manifest reader
+ * @deprecated since 1.11.0, will be removed in 2.0.0; use {@link #readPaths(ManifestFile, FileIO,
Review Comment:
Fine with that
--
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@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Core, Flink, Spark: Deprecate Manifest read methods which rely manifest Metadata [iceberg]
Posted by "pvary (via GitHub)" <gi...@apache.org>.
pvary commented on code in PR #15575:
URL: https://github.com/apache/iceberg/pull/15575#discussion_r2910187622
##########
core/src/main/java/org/apache/iceberg/ManifestFiles.java:
##########
@@ -306,6 +326,10 @@ public static ManifestFile decode(byte[] manifestData) throws IOException {
return AvroEncoderUtil.decode(manifestData);
}
+ /**
+ * @deprecated use {@link #open(ManifestFile, FileIO, Map)} instead
Review Comment:
Please update with the deprecation message
--
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@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Core, Flink, Spark: Deprecate Manifest read methods which rely manifest Metadata [iceberg]
Posted by "RussellSpitzer (via GitHub)" <gi...@apache.org>.
RussellSpitzer commented on PR #15575:
URL: https://github.com/apache/iceberg/pull/15575#issuecomment-4033050021
> Member
I can add in a test for the old path, this pr removes all the old calls (everything was in tests I think)
--
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@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Core, Flink, Spark: Deprecate Manifest read methods which rely manifest Metadata [iceberg]
Posted by "RussellSpitzer (via GitHub)" <gi...@apache.org>.
RussellSpitzer merged PR #15575:
URL: https://github.com/apache/iceberg/pull/15575
--
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@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Core, Flink, Spark: Deprecate Manifest read methods which rely manifest Metadata [iceberg]
Posted by "stevenzwu (via GitHub)" <gi...@apache.org>.
stevenzwu commented on code in PR #15575:
URL: https://github.com/apache/iceberg/pull/15575#discussion_r2913497268
##########
core/src/main/java/org/apache/iceberg/ManifestReader.java:
##########
@@ -126,6 +130,10 @@ protected ManifestReader(
if (specsById != null) {
this.spec = specsById.get(specId);
} else {
+ LOG.warn(
+ "Reading partition spec from manifest file metadata is deprecated and will be "
+ + "removed in a future release. Pass specsById to avoid reading from file metadata: {}",
Review Comment:
nit: `future release` --> `1.12.0 release`.
##########
core/src/main/java/org/apache/iceberg/ManifestFiles.java:
##########
@@ -97,14 +97,30 @@ public static CacheMetricsReport contentCacheStats(FileIO io) {
*
* @param manifest a ManifestFile
* @param io a FileIO
+ * @param specsById a Map from spec ID to partition spec
* @return a manifest reader
*/
- public static CloseableIterable<String> readPaths(ManifestFile manifest, FileIO io) {
+ public static CloseableIterable<String> readPaths(
+ ManifestFile manifest, FileIO io, Map<Integer, PartitionSpec> specsById) {
return CloseableIterable.transform(
- read(manifest, io, null).select(ImmutableList.of("file_path")).liveEntries(),
+ read(manifest, io, specsById).select(ImmutableList.of("file_path")).liveEntries(),
entry -> entry.file().location());
}
+ /**
+ * Returns a {@link CloseableIterable} of file paths in the {@link ManifestFile}.
+ *
+ * @param manifest a ManifestFile
+ * @param io a FileIO
+ * @return a manifest reader
+ * @deprecated since 1.10.0, will be removed in 1.12.0; use {@link #readPaths(ManifestFile,
Review Comment:
next release in 1.11.0
--
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@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Core, Flink, Spark: Deprecate Manifest read methods which rely manifest Metadata [iceberg]
Posted by "stevenzwu (via GitHub)" <gi...@apache.org>.
stevenzwu commented on code in PR #15575:
URL: https://github.com/apache/iceberg/pull/15575#discussion_r2913491491
##########
core/src/main/java/org/apache/iceberg/ManifestFiles.java:
##########
@@ -97,14 +97,30 @@ public static CacheMetricsReport contentCacheStats(FileIO io) {
*
* @param manifest a ManifestFile
* @param io a FileIO
+ * @param specsById a Map from spec ID to partition spec
* @return a manifest reader
*/
- public static CloseableIterable<String> readPaths(ManifestFile manifest, FileIO io) {
+ public static CloseableIterable<String> readPaths(
+ ManifestFile manifest, FileIO io, Map<Integer, PartitionSpec> specsById) {
return CloseableIterable.transform(
- read(manifest, io, null).select(ImmutableList.of("file_path")).liveEntries(),
+ read(manifest, io, specsById).select(ImmutableList.of("file_path")).liveEntries(),
entry -> entry.file().location());
}
+ /**
+ * Returns a {@link CloseableIterable} of file paths in the {@link ManifestFile}.
+ *
+ * @param manifest a ManifestFile
+ * @param io a FileIO
+ * @return a manifest reader
+ * @deprecated since 1.10.0, will be removed in 1.12.0; use {@link #readPaths(ManifestFile,
Review Comment:
next release in 1.11.0. so it should be `since 1.11.0`
##########
core/src/main/java/org/apache/iceberg/ManifestFiles.java:
##########
@@ -97,14 +97,30 @@ public static CacheMetricsReport contentCacheStats(FileIO io) {
*
* @param manifest a ManifestFile
* @param io a FileIO
+ * @param specsById a Map from spec ID to partition spec
* @return a manifest reader
*/
- public static CloseableIterable<String> readPaths(ManifestFile manifest, FileIO io) {
+ public static CloseableIterable<String> readPaths(
+ ManifestFile manifest, FileIO io, Map<Integer, PartitionSpec> specsById) {
return CloseableIterable.transform(
- read(manifest, io, null).select(ImmutableList.of("file_path")).liveEntries(),
+ read(manifest, io, specsById).select(ImmutableList.of("file_path")).liveEntries(),
entry -> entry.file().location());
}
+ /**
+ * Returns a {@link CloseableIterable} of file paths in the {@link ManifestFile}.
+ *
+ * @param manifest a ManifestFile
+ * @param io a FileIO
+ * @return a manifest reader
+ * @deprecated since 1.10.0, will be removed in 1.12.0; use {@link #readPaths(ManifestFile,
Review Comment:
next release is 1.11.0. so it should be `since 1.11.0`
--
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@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Core, Flink, Spark: Deprecate Manifest read methods which rely manifest Metadata [iceberg]
Posted by "pvary (via GitHub)" <gi...@apache.org>.
pvary commented on PR #15575:
URL: https://github.com/apache/iceberg/pull/15575#issuecomment-4029627805
Do we have any place where we still test the old, deprecated methods? Shall we have at least 1 call, just to check they are working?
--
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@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org