feat: [velox+prestissimo][iceberg] Iceberg V3 full C++ support: deletion vectors, equality deletes, sequence number conflict resolution, DV writer, DWRF data sink, Manifold filesystem, PUFFIN protocol (#27462)#27462
Conversation
Reviewer's GuideAdds Iceberg V3 protocol support needed by Prestissimo/Velox for deletion vectors and PUFFIN-format files, including new protocol enum values, PUFFIN-to-DWRF mapping, and split reclassification logic so deletion vector files are correctly routed to the DeletionVectorReader instead of positional delete handling. Sequence diagram for Iceberg V3 deletion vector routingsequenceDiagram
actor Coordinator
participant PrestoWorker
participant IcebergPrestoToVeloxConnector
participant HiveIcebergSplit
participant IcebergSplitReader
participant DeletionVectorReader
participant PositionalDeleteFileReader
Coordinator->>PrestoWorker: Send IcebergSplit with deletes
PrestoWorker->>IcebergPrestoToVeloxConnector: toVeloxSplit(catalogId, connectorSplit, splitContext)
IcebergPrestoToVeloxConnector->>IcebergPrestoToVeloxConnector: dynamic_cast to IcebergSplit*
loop For each deleteFile in icebergSplit.deletes
IcebergPrestoToVeloxConnector->>IcebergPrestoToVeloxConnector: toVeloxFileContent(deleteFile.content)
IcebergPrestoToVeloxConnector->>IcebergPrestoToVeloxConnector: toVeloxFileFormat(deleteFile.format)
alt PUFFIN positional deletes (deletion vector)
IcebergPrestoToVeloxConnector->>IcebergPrestoToVeloxConnector: veloxContent = kDeletionVector
else Other delete file
IcebergPrestoToVeloxConnector->>IcebergPrestoToVeloxConnector: veloxContent unchanged
end
IcebergPrestoToVeloxConnector->>IcebergPrestoToVeloxConnector: Construct IcebergDeleteFile with veloxContent
end
IcebergPrestoToVeloxConnector->>HiveIcebergSplit: Create HiveIcebergSplit with deletes
IcebergPrestoToVeloxConnector-->>PrestoWorker: Return HiveIcebergSplit
PrestoWorker->>IcebergSplitReader: Read HiveIcebergSplit
alt Delete file content is kDeletionVector
IcebergSplitReader->>DeletionVectorReader: Read PUFFIN deletion vector
else Delete file content is kPositionalDeletes
IcebergSplitReader->>PositionalDeleteFileReader: Read positional delete file
end
Class diagram for updated Iceberg file format and content enumsclassDiagram
class FileContent {
<<enum>>
DATA
POSITION_DELETES
EQUALITY_DELETES
}
class FileFormat {
<<enum>>
ORC
PARQUET
AVRO
METADATA
PUFFIN
}
class IcebergDeleteFile {
+FileContent content
+string path
+FileFormat format
+int64_t recordCount
+unordered_map~int32_t, string~ lowerBounds
+unordered_map~int32_t, string~ upperBounds
}
class VeloxFileFormat {
<<enum>>
ORC
PARQUET
DWRF
}
class VeloxFileContent {
<<enum>>
kData
kPositionalDeletes
kEqualityDeletes
kDeletionVector
}
class IcebergPrestoToVeloxConnector {
+toVeloxFileFormat(FileFormat format) VeloxFileFormat
+toVeloxSplit(ConnectorId catalogId, ConnectorSplit connectorSplit, SplitContext splitContext) HiveIcebergSplitPtr
}
FileContent "1" --> "*" IcebergDeleteFile : content
FileFormat "1" --> "*" IcebergDeleteFile : format
VeloxFileFormat <-- IcebergPrestoToVeloxConnector : maps from FileFormat
VeloxFileContent <-- IcebergPrestoToVeloxConnector : maps from FileContent
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The
toVeloxFileFormatmapping ofPUFFINtoDWRFrelies on comments to guarantee it's only used for deletion vectors; consider adding a runtime check (e.g., asserting the associatedFileContentis positional delete/DV) at the call site to fail fast if PUFFIN is ever used for other content types. - Given that Iceberg V3 deletion vectors are encoded as
POSITION_DELETES+PUFFINat the protocol layer and reclassified later, it may be worth adding a brief comment next to theFileContentenum definition clarifying this convention to avoid future misclassification when new content types are added.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The `toVeloxFileFormat` mapping of `PUFFIN` to `DWRF` relies on comments to guarantee it's only used for deletion vectors; consider adding a runtime check (e.g., asserting the associated `FileContent` is positional delete/DV) at the call site to fail fast if PUFFIN is ever used for other content types.
- Given that Iceberg V3 deletion vectors are encoded as `POSITION_DELETES` + `PUFFIN` at the protocol layer and reclassified later, it may be worth adding a brief comment next to the `FileContent` enum definition clarifying this convention to avoid future misclassification when new content types are added.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
84ab4d1 to
91ee950
Compare
…ion vectors, equality deletes, sequence number conflict resolution, DV writer, DWRF data sink, Manifold filesystem, PUFFIN protocol (prestodb#27462) Summary: X-link: facebookincubator/velox#16959 Combined velox/prestissimo diffs for Iceberg V3 C++ support: - Improve IcebergSplitReader error handling and fix test file handle leaks - Add Iceberg V3 deletion vector support (DeletionVectorReader) - Add Iceberg equality delete file reader (EqualityDeleteFileReader) - Add sequence number conflict resolution for equality deletes - Add sequence number conflict resolution for positional deletes and deletion vectors - Add Iceberg V3 deletion vector writer (DeletionVectorWriter) - Add DWRF file format support for Iceberg data sink - Add Manifold filesystem support with CAT token authentication - Reformat FileContent enum to multi-line for extensibility - Wire PUFFIN file format through C++ protocol and connector layer Thrift ODR Violation Blocking Native Parquet Writes in Velox Problem Velox's Parquet writer crashes with SIGSEGV when linked into any binary that also uses FBThrift (e.g., Prestissimo presto_server). The crash is a C++ One Definition Rule (ODR) violation. Root Cause Velox's Parquet writer depends on OSS Apache Thrift (third-party2/apache-thrift/) for serializing Parquet page headers and file metadata. FBThrift (fbcode/thrift/) is Meta's fork used by RPC services. Both libraries declare classes in the same namespace (apache::thrift::protocol::TProtocol, apache::thrift::transport::TTransport, etc.) but with incompatible class layouts: OSS Apache Thrift (Parquet) FBThrift (Prestissimo RPC) Namespace apache::thrift apache::thrift TTransport size ~40 bytes (has TConfiguration shared_ptr, message size fields) ~8 bytes (vtable pointer only) fd_ offset in TFDTransport ~40+ ~8 When both are linked into one binary, the linker picks one definition. Code compiled against the other layout reads wrong memory offsets → SIGSEGV. Crash Signature Signal 11 (SIGSEGV) (0x0) std::_Sp_counted_base<>::_M_release_slow_last_use() ← null shared_ptr control block apache::thrift::protocol::TProtocol::TProtocol() ← wrong TTransport layout ThriftSerializer::ThriftSerializer() ← Parquet page header serialization SerializedPageWriter::SerializedPageWriter() Writer::close() → flush() → writeTable() IcebergDataSink::closeInternal() ← triggered by any native Parquet write Impact All native Parquet writes crash (INSERT, CTAS) in any Velox binary that links FBThrift DWRF/ORC writes are unaffected (they don't use thrift serialization) Parquet reads are unaffected (reads use a different thrift code path that happens to not trigger the ODR) Affects Prestissimo, and potentially any Velox embedder (Gluten/Spark, etc.) that links both Parquet and another thrift variant Prior Art SEV 635079 — same ODR caused SIGSEGV crashes in Spark F3 pipelines (March 2026, SEV-2) Apache Arrow already solved this by vendoring OSS thrift in private_parquet::apache::thrift namespace (D47918122, 2023) T262970501 — tracking task for addressing the Parquet thrift dependency GitHub issue prestodb#13175 — upstream tracking Solution: X-link: facebookincubator/velox#16019 this will help fix it. Differential Revision: D98704718
91ee950 to
bed2681
Compare
…ion vectors, equality deletes, sequence number conflict resolution, DV writer, DWRF data sink, Manifold filesystem, PUFFIN protocol (facebookincubator#16959) Summary: X-link: prestodb/presto#27462 Combined velox/prestissimo diffs for Iceberg V3 C++ support: - Improve IcebergSplitReader error handling and fix test file handle leaks - Add Iceberg V3 deletion vector support (DeletionVectorReader) - Add Iceberg equality delete file reader (EqualityDeleteFileReader) - Add sequence number conflict resolution for equality deletes - Add sequence number conflict resolution for positional deletes and deletion vectors - Add Iceberg V3 deletion vector writer (DeletionVectorWriter) - Add DWRF file format support for Iceberg data sink - Add Manifold filesystem support with CAT token authentication - Reformat FileContent enum to multi-line for extensibility - Wire PUFFIN file format through C++ protocol and connector layer Thrift ODR Violation Blocking Native Parquet Writes in Velox Problem Velox's Parquet writer crashes with SIGSEGV when linked into any binary that also uses FBThrift (e.g., Prestissimo presto_server). The crash is a C++ One Definition Rule (ODR) violation. Root Cause Velox's Parquet writer depends on OSS Apache Thrift (third-party2/apache-thrift/) for serializing Parquet page headers and file metadata. FBThrift (fbcode/thrift/) is Meta's fork used by RPC services. Both libraries declare classes in the same namespace (apache::thrift::protocol::TProtocol, apache::thrift::transport::TTransport, etc.) but with incompatible class layouts: OSS Apache Thrift (Parquet) FBThrift (Prestissimo RPC) Namespace apache::thrift apache::thrift TTransport size ~40 bytes (has TConfiguration shared_ptr, message size fields) ~8 bytes (vtable pointer only) fd_ offset in TFDTransport ~40+ ~8 When both are linked into one binary, the linker picks one definition. Code compiled against the other layout reads wrong memory offsets → SIGSEGV. Crash Signature Signal 11 (SIGSEGV) (0x0) std::_Sp_counted_base<>::_M_release_slow_last_use() ← null shared_ptr control block apache::thrift::protocol::TProtocol::TProtocol() ← wrong TTransport layout ThriftSerializer::ThriftSerializer() ← Parquet page header serialization SerializedPageWriter::SerializedPageWriter() Writer::close() → flush() → writeTable() IcebergDataSink::closeInternal() ← triggered by any native Parquet write Impact All native Parquet writes crash (INSERT, CTAS) in any Velox binary that links FBThrift DWRF/ORC writes are unaffected (they don't use thrift serialization) Parquet reads are unaffected (reads use a different thrift code path that happens to not trigger the ODR) Affects Prestissimo, and potentially any Velox embedder (Gluten/Spark, etc.) that links both Parquet and another thrift variant Prior Art SEV 635079 — same ODR caused SIGSEGV crashes in Spark F3 pipelines (March 2026, SEV-2) Apache Arrow already solved this by vendoring OSS thrift in private_parquet::apache::thrift namespace (D47918122, 2023) T262970501 — tracking task for addressing the Parquet thrift dependency GitHub issue facebookincubator#13175 — upstream tracking Solution: Differential Revision: D98704718
…ion vectors, equality deletes, sequence number conflict resolution, DV writer, DWRF data sink, Manifold filesystem, PUFFIN protocol (prestodb#27462) Summary: X-link: facebookincubator/velox#16959 Combined velox/prestissimo diffs for Iceberg V3 C++ support: - Improve IcebergSplitReader error handling and fix test file handle leaks - Add Iceberg V3 deletion vector support (DeletionVectorReader) - Add Iceberg equality delete file reader (EqualityDeleteFileReader) - Add sequence number conflict resolution for equality deletes - Add sequence number conflict resolution for positional deletes and deletion vectors - Add Iceberg V3 deletion vector writer (DeletionVectorWriter) - Add DWRF file format support for Iceberg data sink - Add Manifold filesystem support with CAT token authentication - Reformat FileContent enum to multi-line for extensibility - Wire PUFFIN file format through C++ protocol and connector layer Thrift ODR Violation Blocking Native Parquet Writes in Velox Problem Velox's Parquet writer crashes with SIGSEGV when linked into any binary that also uses FBThrift (e.g., Prestissimo presto_server). The crash is a C++ One Definition Rule (ODR) violation. Root Cause Velox's Parquet writer depends on OSS Apache Thrift (third-party2/apache-thrift/) for serializing Parquet page headers and file metadata. FBThrift (fbcode/thrift/) is Meta's fork used by RPC services. Both libraries declare classes in the same namespace (apache::thrift::protocol::TProtocol, apache::thrift::transport::TTransport, etc.) but with incompatible class layouts: OSS Apache Thrift (Parquet) FBThrift (Prestissimo RPC) Namespace apache::thrift apache::thrift TTransport size ~40 bytes (has TConfiguration shared_ptr, message size fields) ~8 bytes (vtable pointer only) fd_ offset in TFDTransport ~40+ ~8 When both are linked into one binary, the linker picks one definition. Code compiled against the other layout reads wrong memory offsets → SIGSEGV. Crash Signature Signal 11 (SIGSEGV) (0x0) std::_Sp_counted_base<>::_M_release_slow_last_use() ← null shared_ptr control block apache::thrift::protocol::TProtocol::TProtocol() ← wrong TTransport layout ThriftSerializer::ThriftSerializer() ← Parquet page header serialization SerializedPageWriter::SerializedPageWriter() Writer::close() → flush() → writeTable() IcebergDataSink::closeInternal() ← triggered by any native Parquet write Impact All native Parquet writes crash (INSERT, CTAS) in any Velox binary that links FBThrift DWRF/ORC writes are unaffected (they don't use thrift serialization) Parquet reads are unaffected (reads use a different thrift code path that happens to not trigger the ODR) Affects Prestissimo, and potentially any Velox embedder (Gluten/Spark, etc.) that links both Parquet and another thrift variant Prior Art SEV 635079 — same ODR caused SIGSEGV crashes in Spark F3 pipelines (March 2026, SEV-2) Apache Arrow already solved this by vendoring OSS thrift in private_parquet::apache::thrift namespace (D47918122, 2023) T262970501 — tracking task for addressing the Parquet thrift dependency GitHub issue prestodb#13175 — upstream tracking Solution: X-link: facebookincubator/velox#16019 this will help fix it. Differential Revision: D98704718
bed2681 to
dfcdc6f
Compare
…ion vectors, equality deletes, sequence number conflict resolution, DV writer, DWRF data sink, Manifold filesystem, PUFFIN protocol (facebookincubator#16959) Summary: X-link: prestodb/presto#27462 Combined velox/prestissimo diffs for Iceberg V3 C++ support: - Improve IcebergSplitReader error handling and fix test file handle leaks - Add Iceberg V3 deletion vector support (DeletionVectorReader) - Add Iceberg equality delete file reader (EqualityDeleteFileReader) - Add sequence number conflict resolution for equality deletes - Add sequence number conflict resolution for positional deletes and deletion vectors - Add Iceberg V3 deletion vector writer (DeletionVectorWriter) - Add DWRF file format support for Iceberg data sink - Add Manifold filesystem support with CAT token authentication - Reformat FileContent enum to multi-line for extensibility - Wire PUFFIN file format through C++ protocol and connector layer Thrift ODR Violation Blocking Native Parquet Writes in Velox Problem Velox's Parquet writer crashes with SIGSEGV when linked into any binary that also uses FBThrift (e.g., Prestissimo presto_server). The crash is a C++ One Definition Rule (ODR) violation. Root Cause Velox's Parquet writer depends on OSS Apache Thrift (third-party2/apache-thrift/) for serializing Parquet page headers and file metadata. FBThrift (fbcode/thrift/) is Meta's fork used by RPC services. Both libraries declare classes in the same namespace (apache::thrift::protocol::TProtocol, apache::thrift::transport::TTransport, etc.) but with incompatible class layouts: OSS Apache Thrift (Parquet) FBThrift (Prestissimo RPC) Namespace apache::thrift apache::thrift TTransport size ~40 bytes (has TConfiguration shared_ptr, message size fields) ~8 bytes (vtable pointer only) fd_ offset in TFDTransport ~40+ ~8 When both are linked into one binary, the linker picks one definition. Code compiled against the other layout reads wrong memory offsets → SIGSEGV. Crash Signature Signal 11 (SIGSEGV) (0x0) std::_Sp_counted_base<>::_M_release_slow_last_use() ← null shared_ptr control block apache::thrift::protocol::TProtocol::TProtocol() ← wrong TTransport layout ThriftSerializer::ThriftSerializer() ← Parquet page header serialization SerializedPageWriter::SerializedPageWriter() Writer::close() → flush() → writeTable() IcebergDataSink::closeInternal() ← triggered by any native Parquet write Impact All native Parquet writes crash (INSERT, CTAS) in any Velox binary that links FBThrift DWRF/ORC writes are unaffected (they don't use thrift serialization) Parquet reads are unaffected (reads use a different thrift code path that happens to not trigger the ODR) Affects Prestissimo, and potentially any Velox embedder (Gluten/Spark, etc.) that links both Parquet and another thrift variant Prior Art SEV 635079 — same ODR caused SIGSEGV crashes in Spark F3 pipelines (March 2026, SEV-2) Apache Arrow already solved this by vendoring OSS thrift in private_parquet::apache::thrift namespace (D47918122, 2023) T262970501 — tracking task for addressing the Parquet thrift dependency GitHub issue facebookincubator#13175 — upstream tracking Solution: Differential Revision: D98704718
…ion vectors, equality deletes, sequence number conflict resolution, DV writer, DWRF data sink, Manifold filesystem, PUFFIN protocol (prestodb#27462) Summary: X-link: facebookincubator/velox#16959 Pull Request resolved: prestodb#27462 Combined velox/prestissimo diffs for Iceberg V3 C++ support: - Improve IcebergSplitReader error handling and fix test file handle leaks - Add Iceberg V3 deletion vector support (DeletionVectorReader) - Add Iceberg equality delete file reader (EqualityDeleteFileReader) - Add sequence number conflict resolution for equality deletes - Add sequence number conflict resolution for positional deletes and deletion vectors - Add Iceberg V3 deletion vector writer (DeletionVectorWriter) - Add DWRF file format support for Iceberg data sink - Add Manifold filesystem support with CAT token authentication - Reformat FileContent enum to multi-line for extensibility - Wire PUFFIN file format through C++ protocol and connector layer Thrift ODR Violation Blocking Native Parquet Writes in Velox Problem Velox's Parquet writer crashes with SIGSEGV when linked into any binary that also uses FBThrift (e.g., Prestissimo presto_server). The crash is a C++ One Definition Rule (ODR) violation. Root Cause Velox's Parquet writer depends on OSS Apache Thrift (third-party2/apache-thrift/) for serializing Parquet page headers and file metadata. FBThrift (fbcode/thrift/) is Meta's fork used by RPC services. Both libraries declare classes in the same namespace (apache::thrift::protocol::TProtocol, apache::thrift::transport::TTransport, etc.) but with incompatible class layouts: OSS Apache Thrift (Parquet) FBThrift (Prestissimo RPC) Namespace apache::thrift apache::thrift TTransport size ~40 bytes (has TConfiguration shared_ptr, message size fields) ~8 bytes (vtable pointer only) fd_ offset in TFDTransport ~40+ ~8 When both are linked into one binary, the linker picks one definition. Code compiled against the other layout reads wrong memory offsets → SIGSEGV. Crash Signature Signal 11 (SIGSEGV) (0x0) std::_Sp_counted_base<>::_M_release_slow_last_use() ← null shared_ptr control block apache::thrift::protocol::TProtocol::TProtocol() ← wrong TTransport layout ThriftSerializer::ThriftSerializer() ← Parquet page header serialization SerializedPageWriter::SerializedPageWriter() Writer::close() → flush() → writeTable() IcebergDataSink::closeInternal() ← triggered by any native Parquet write Impact All native Parquet writes crash (INSERT, CTAS) in any Velox binary that links FBThrift DWRF/ORC writes are unaffected (they don't use thrift serialization) Parquet reads are unaffected (reads use a different thrift code path that happens to not trigger the ODR) Affects Prestissimo, and potentially any Velox embedder (Gluten/Spark, etc.) that links both Parquet and another thrift variant Prior Art SEV 635079 — same ODR caused SIGSEGV crashes in Spark F3 pipelines (March 2026, SEV-2) Apache Arrow already solved this by vendoring OSS thrift in private_parquet::apache::thrift namespace (D47918122, 2023) T262970501 — tracking task for addressing the Parquet thrift dependency GitHub issue prestodb#13175 — upstream tracking Solution: X-link: facebookincubator/velox#16019 this will help fix it. Differential Revision: D98704718
dfcdc6f to
9db1110
Compare
…ion vectors, equality deletes, sequence number conflict resolution, DV writer, DWRF data sink, Manifold filesystem, PUFFIN protocol (facebookincubator#16959) Summary: Pull Request resolved: facebookincubator#16959 X-link: prestodb/presto#27462 Combined velox/prestissimo diffs for Iceberg V3 C++ support: - Improve IcebergSplitReader error handling and fix test file handle leaks - Add Iceberg V3 deletion vector support (DeletionVectorReader) - Add Iceberg equality delete file reader (EqualityDeleteFileReader) - Add sequence number conflict resolution for equality deletes - Add sequence number conflict resolution for positional deletes and deletion vectors - Add Iceberg V3 deletion vector writer (DeletionVectorWriter) - Add DWRF file format support for Iceberg data sink - Add Manifold filesystem support with CAT token authentication - Reformat FileContent enum to multi-line for extensibility - Wire PUFFIN file format through C++ protocol and connector layer Thrift ODR Violation Blocking Native Parquet Writes in Velox Problem Velox's Parquet writer crashes with SIGSEGV when linked into any binary that also uses FBThrift (e.g., Prestissimo presto_server). The crash is a C++ One Definition Rule (ODR) violation. Root Cause Velox's Parquet writer depends on OSS Apache Thrift (third-party2/apache-thrift/) for serializing Parquet page headers and file metadata. FBThrift (fbcode/thrift/) is Meta's fork used by RPC services. Both libraries declare classes in the same namespace (apache::thrift::protocol::TProtocol, apache::thrift::transport::TTransport, etc.) but with incompatible class layouts: OSS Apache Thrift (Parquet) FBThrift (Prestissimo RPC) Namespace apache::thrift apache::thrift TTransport size ~40 bytes (has TConfiguration shared_ptr, message size fields) ~8 bytes (vtable pointer only) fd_ offset in TFDTransport ~40+ ~8 When both are linked into one binary, the linker picks one definition. Code compiled against the other layout reads wrong memory offsets → SIGSEGV. Crash Signature Signal 11 (SIGSEGV) (0x0) std::_Sp_counted_base<>::_M_release_slow_last_use() ← null shared_ptr control block apache::thrift::protocol::TProtocol::TProtocol() ← wrong TTransport layout ThriftSerializer::ThriftSerializer() ← Parquet page header serialization SerializedPageWriter::SerializedPageWriter() Writer::close() → flush() → writeTable() IcebergDataSink::closeInternal() ← triggered by any native Parquet write Impact All native Parquet writes crash (INSERT, CTAS) in any Velox binary that links FBThrift DWRF/ORC writes are unaffected (they don't use thrift serialization) Parquet reads are unaffected (reads use a different thrift code path that happens to not trigger the ODR) Affects Prestissimo, and potentially any Velox embedder (Gluten/Spark, etc.) that links both Parquet and another thrift variant Prior Art SEV 635079 — same ODR caused SIGSEGV crashes in Spark F3 pipelines (March 2026, SEV-2) Apache Arrow already solved this by vendoring OSS thrift in private_parquet::apache::thrift namespace (D47918122, 2023) T262970501 — tracking task for addressing the Parquet thrift dependency GitHub issue facebookincubator#13175 — upstream tracking Solution: Pull Request resolved: facebookincubator#16019 this will help fix it. Differential Revision: D98704718
…ion vectors, equality deletes, sequence number conflict resolution, DV writer, DWRF data sink, Manifold filesystem, PUFFIN protocol (prestodb#27462) Summary: X-link: facebookincubator/velox#16959 Combined velox/prestissimo diffs for Iceberg V3 C++ support: - Improve IcebergSplitReader error handling and fix test file handle leaks - Add Iceberg V3 deletion vector support (DeletionVectorReader) - Add Iceberg equality delete file reader (EqualityDeleteFileReader) - Add sequence number conflict resolution for equality deletes - Add sequence number conflict resolution for positional deletes and deletion vectors - Add Iceberg V3 deletion vector writer (DeletionVectorWriter) - Add DWRF file format support for Iceberg data sink - Add Manifold filesystem support with CAT token authentication - Reformat FileContent enum to multi-line for extensibility - Wire PUFFIN file format through C++ protocol and connector layer Thrift ODR Violation Blocking Native Parquet Writes in Velox Problem Velox's Parquet writer crashes with SIGSEGV when linked into any binary that also uses FBThrift (e.g., Prestissimo presto_server). The crash is a C++ One Definition Rule (ODR) violation. Root Cause Velox's Parquet writer depends on OSS Apache Thrift (third-party2/apache-thrift/) for serializing Parquet page headers and file metadata. FBThrift (fbcode/thrift/) is Meta's fork used by RPC services. Both libraries declare classes in the same namespace (apache::thrift::protocol::TProtocol, apache::thrift::transport::TTransport, etc.) but with incompatible class layouts: OSS Apache Thrift (Parquet) FBThrift (Prestissimo RPC) Namespace apache::thrift apache::thrift TTransport size ~40 bytes (has TConfiguration shared_ptr, message size fields) ~8 bytes (vtable pointer only) fd_ offset in TFDTransport ~40+ ~8 When both are linked into one binary, the linker picks one definition. Code compiled against the other layout reads wrong memory offsets → SIGSEGV. Crash Signature Signal 11 (SIGSEGV) (0x0) std::_Sp_counted_base<>::_M_release_slow_last_use() ← null shared_ptr control block apache::thrift::protocol::TProtocol::TProtocol() ← wrong TTransport layout ThriftSerializer::ThriftSerializer() ← Parquet page header serialization SerializedPageWriter::SerializedPageWriter() Writer::close() → flush() → writeTable() IcebergDataSink::closeInternal() ← triggered by any native Parquet write Impact All native Parquet writes crash (INSERT, CTAS) in any Velox binary that links FBThrift DWRF/ORC writes are unaffected (they don't use thrift serialization) Parquet reads are unaffected (reads use a different thrift code path that happens to not trigger the ODR) Affects Prestissimo, and potentially any Velox embedder (Gluten/Spark, etc.) that links both Parquet and another thrift variant Prior Art SEV 635079 — same ODR caused SIGSEGV crashes in Spark F3 pipelines (March 2026, SEV-2) Apache Arrow already solved this by vendoring OSS thrift in private_parquet::apache::thrift namespace (D47918122, 2023) T262970501 — tracking task for addressing the Parquet thrift dependency GitHub issue prestodb#13175 — upstream tracking Solution: X-link: facebookincubator/velox#16019 this will help fix it. Differential Revision: D98704718
9db1110 to
e9bad0c
Compare
…ion vectors, equality deletes, sequence number conflict resolution, DV writer, DWRF data sink, Manifold filesystem, PUFFIN protocol (facebookincubator#16959) Summary: X-link: prestodb/presto#27462 Combined velox/prestissimo diffs for Iceberg V3 C++ support: - Improve IcebergSplitReader error handling and fix test file handle leaks - Add Iceberg V3 deletion vector support (DeletionVectorReader) - Add Iceberg equality delete file reader (EqualityDeleteFileReader) - Add sequence number conflict resolution for equality deletes - Add sequence number conflict resolution for positional deletes and deletion vectors - Add Iceberg V3 deletion vector writer (DeletionVectorWriter) - Add DWRF file format support for Iceberg data sink - Add Manifold filesystem support with CAT token authentication - Reformat FileContent enum to multi-line for extensibility - Wire PUFFIN file format through C++ protocol and connector layer Thrift ODR Violation Blocking Native Parquet Writes in Velox Problem Velox's Parquet writer crashes with SIGSEGV when linked into any binary that also uses FBThrift (e.g., Prestissimo presto_server). The crash is a C++ One Definition Rule (ODR) violation. Root Cause Velox's Parquet writer depends on OSS Apache Thrift (third-party2/apache-thrift/) for serializing Parquet page headers and file metadata. FBThrift (fbcode/thrift/) is Meta's fork used by RPC services. Both libraries declare classes in the same namespace (apache::thrift::protocol::TProtocol, apache::thrift::transport::TTransport, etc.) but with incompatible class layouts: OSS Apache Thrift (Parquet) FBThrift (Prestissimo RPC) Namespace apache::thrift apache::thrift TTransport size ~40 bytes (has TConfiguration shared_ptr, message size fields) ~8 bytes (vtable pointer only) fd_ offset in TFDTransport ~40+ ~8 When both are linked into one binary, the linker picks one definition. Code compiled against the other layout reads wrong memory offsets → SIGSEGV. Crash Signature Signal 11 (SIGSEGV) (0x0) std::_Sp_counted_base<>::_M_release_slow_last_use() ← null shared_ptr control block apache::thrift::protocol::TProtocol::TProtocol() ← wrong TTransport layout ThriftSerializer::ThriftSerializer() ← Parquet page header serialization SerializedPageWriter::SerializedPageWriter() Writer::close() → flush() → writeTable() IcebergDataSink::closeInternal() ← triggered by any native Parquet write Impact All native Parquet writes crash (INSERT, CTAS) in any Velox binary that links FBThrift DWRF/ORC writes are unaffected (they don't use thrift serialization) Parquet reads are unaffected (reads use a different thrift code path that happens to not trigger the ODR) Affects Prestissimo, and potentially any Velox embedder (Gluten/Spark, etc.) that links both Parquet and another thrift variant Prior Art SEV 635079 — same ODR caused SIGSEGV crashes in Spark F3 pipelines (March 2026, SEV-2) Apache Arrow already solved this by vendoring OSS thrift in private_parquet::apache::thrift namespace (D47918122, 2023) T262970501 — tracking task for addressing the Parquet thrift dependency GitHub issue facebookincubator#13175 — upstream tracking Solution: Differential Revision: D98704718
…ion vectors, equality deletes, sequence number conflict resolution, DV writer, DWRF data sink, Manifold filesystem, PUFFIN protocol (prestodb#27462) Summary: X-link: facebookincubator/velox#16959 Pull Request resolved: prestodb#27462 Combined velox/prestissimo diffs for Iceberg V3 C++ support: - Improve IcebergSplitReader error handling and fix test file handle leaks - Add Iceberg V3 deletion vector support (DeletionVectorReader) - Add Iceberg equality delete file reader (EqualityDeleteFileReader) - Add sequence number conflict resolution for equality deletes - Add sequence number conflict resolution for positional deletes and deletion vectors - Add Iceberg V3 deletion vector writer (DeletionVectorWriter) - Add DWRF file format support for Iceberg data sink - Add Manifold filesystem support with CAT token authentication - Reformat FileContent enum to multi-line for extensibility - Wire PUFFIN file format through C++ protocol and connector layer Thrift ODR Violation Blocking Native Parquet Writes in Velox Problem Velox's Parquet writer crashes with SIGSEGV when linked into any binary that also uses FBThrift (e.g., Prestissimo presto_server). The crash is a C++ One Definition Rule (ODR) violation. Root Cause Velox's Parquet writer depends on OSS Apache Thrift (third-party2/apache-thrift/) for serializing Parquet page headers and file metadata. FBThrift (fbcode/thrift/) is Meta's fork used by RPC services. Both libraries declare classes in the same namespace (apache::thrift::protocol::TProtocol, apache::thrift::transport::TTransport, etc.) but with incompatible class layouts: OSS Apache Thrift (Parquet) FBThrift (Prestissimo RPC) Namespace apache::thrift apache::thrift TTransport size ~40 bytes (has TConfiguration shared_ptr, message size fields) ~8 bytes (vtable pointer only) fd_ offset in TFDTransport ~40+ ~8 When both are linked into one binary, the linker picks one definition. Code compiled against the other layout reads wrong memory offsets → SIGSEGV. Crash Signature Signal 11 (SIGSEGV) (0x0) std::_Sp_counted_base<>::_M_release_slow_last_use() ← null shared_ptr control block apache::thrift::protocol::TProtocol::TProtocol() ← wrong TTransport layout ThriftSerializer::ThriftSerializer() ← Parquet page header serialization SerializedPageWriter::SerializedPageWriter() Writer::close() → flush() → writeTable() IcebergDataSink::closeInternal() ← triggered by any native Parquet write Impact All native Parquet writes crash (INSERT, CTAS) in any Velox binary that links FBThrift DWRF/ORC writes are unaffected (they don't use thrift serialization) Parquet reads are unaffected (reads use a different thrift code path that happens to not trigger the ODR) Affects Prestissimo, and potentially any Velox embedder (Gluten/Spark, etc.) that links both Parquet and another thrift variant Prior Art SEV 635079 — same ODR caused SIGSEGV crashes in Spark F3 pipelines (March 2026, SEV-2) Apache Arrow already solved this by vendoring OSS thrift in private_parquet::apache::thrift namespace (D47918122, 2023) T262970501 — tracking task for addressing the Parquet thrift dependency GitHub issue prestodb#13175 — upstream tracking Solution: X-link: facebookincubator/velox#16019 this will help fix it. Differential Revision: D98704718
…ion vectors, equality deletes, sequence number conflict resolution, DV writer, DWRF data sink, Manifold filesystem, PUFFIN protocol (facebookincubator#16959) Summary: Pull Request resolved: facebookincubator#16959 X-link: prestodb/presto#27462 Combined velox/prestissimo diffs for Iceberg V3 C++ support: - Improve IcebergSplitReader error handling and fix test file handle leaks - Add Iceberg V3 deletion vector support (DeletionVectorReader) - Add Iceberg equality delete file reader (EqualityDeleteFileReader) - Add sequence number conflict resolution for equality deletes - Add sequence number conflict resolution for positional deletes and deletion vectors - Add Iceberg V3 deletion vector writer (DeletionVectorWriter) - Add DWRF file format support for Iceberg data sink - Add Manifold filesystem support with CAT token authentication - Reformat FileContent enum to multi-line for extensibility - Wire PUFFIN file format through C++ protocol and connector layer Thrift ODR Violation Blocking Native Parquet Writes in Velox Problem Velox's Parquet writer crashes with SIGSEGV when linked into any binary that also uses FBThrift (e.g., Prestissimo presto_server). The crash is a C++ One Definition Rule (ODR) violation. Root Cause Velox's Parquet writer depends on OSS Apache Thrift (third-party2/apache-thrift/) for serializing Parquet page headers and file metadata. FBThrift (fbcode/thrift/) is Meta's fork used by RPC services. Both libraries declare classes in the same namespace (apache::thrift::protocol::TProtocol, apache::thrift::transport::TTransport, etc.) but with incompatible class layouts: OSS Apache Thrift (Parquet) FBThrift (Prestissimo RPC) Namespace apache::thrift apache::thrift TTransport size ~40 bytes (has TConfiguration shared_ptr, message size fields) ~8 bytes (vtable pointer only) fd_ offset in TFDTransport ~40+ ~8 When both are linked into one binary, the linker picks one definition. Code compiled against the other layout reads wrong memory offsets → SIGSEGV. Crash Signature Signal 11 (SIGSEGV) (0x0) std::_Sp_counted_base<>::_M_release_slow_last_use() ← null shared_ptr control block apache::thrift::protocol::TProtocol::TProtocol() ← wrong TTransport layout ThriftSerializer::ThriftSerializer() ← Parquet page header serialization SerializedPageWriter::SerializedPageWriter() Writer::close() → flush() → writeTable() IcebergDataSink::closeInternal() ← triggered by any native Parquet write Impact All native Parquet writes crash (INSERT, CTAS) in any Velox binary that links FBThrift DWRF/ORC writes are unaffected (they don't use thrift serialization) Parquet reads are unaffected (reads use a different thrift code path that happens to not trigger the ODR) Affects Prestissimo, and potentially any Velox embedder (Gluten/Spark, etc.) that links both Parquet and another thrift variant Prior Art SEV 635079 — same ODR caused SIGSEGV crashes in Spark F3 pipelines (March 2026, SEV-2) Apache Arrow already solved this by vendoring OSS thrift in private_parquet::apache::thrift namespace (D47918122, 2023) T262970501 — tracking task for addressing the Parquet thrift dependency GitHub issue facebookincubator#13175 — upstream tracking Solution: Pull Request resolved: facebookincubator#16019 this will help fix it. Differential Revision: D98704718
e9bad0c to
ed9a91a
Compare
Summary:
X-link: facebookincubator/velox#16959
Combined velox/prestissimo diffs for Iceberg V3 C++ support:
Thrift ODR Violation Blocking Native Parquet Writes in Velox
Problem
Velox's Parquet writer crashes with SIGSEGV when linked into any binary that also uses FBThrift (e.g., Prestissimo presto_server). The crash is a C++ One Definition Rule (ODR) violation.
Root Cause
Velox's Parquet writer depends on OSS Apache Thrift (third-party2/apache-thrift/) for serializing Parquet page headers and file metadata. FBThrift (fbcode/thrift/) is Meta's fork used by RPC services. Both libraries declare classes in the same namespace (apache::thrift::protocol::TProtocol, apache::thrift::transport::TTransport, etc.) but with incompatible class layouts:
OSS Apache Thrift (Parquet) FBThrift (Prestissimo RPC)
Namespace apache::thrift apache::thrift
TTransport size ~40 bytes (has TConfiguration shared_ptr, message size fields) ~8 bytes (vtable pointer only)
fd_ offset in TFDTransport ~40+ ~8
When both are linked into one binary, the linker picks one definition. Code compiled against the other layout reads wrong memory offsets → SIGSEGV.
Crash Signature
Signal 11 (SIGSEGV) (0x0)
std::_Sp_counted_base<>::_M_release_slow_last_use() ← null shared_ptr control block
apache::thrift::protocol::TProtocol::TProtocol() ← wrong TTransport layout
ThriftSerializer::ThriftSerializer() ← Parquet page header serialization
SerializedPageWriter::SerializedPageWriter()
Writer::close() → flush() → writeTable()
IcebergDataSink::closeInternal() ← triggered by any native Parquet write
Impact
All native Parquet writes crash (INSERT, CTAS) in any Velox binary that links FBThrift
DWRF/ORC writes are unaffected (they don't use thrift serialization)
Parquet reads are unaffected (reads use a different thrift code path that happens to not trigger the ODR)
Affects Prestissimo, and potentially any Velox embedder (Gluten/Spark, etc.) that links both Parquet and another thrift variant
Prior Art
SEV 635079 — same ODR caused SIGSEGV crashes in Spark F3 pipelines (March 2026, SEV-2)
Apache Arrow already solved this by vendoring OSS thrift in private_parquet::apache::thrift namespace (D47918122, 2023)
T262970501 — tracking task for addressing the Parquet thrift dependency
GitHub issue #13175 — upstream tracking
Solution:
X-link: facebookincubator/velox#16019 this will help fix it.
Differential Revision: D98704718