From e4f33f4bf0aec1f896ab3de4fe81ec8b3af1ac49 Mon Sep 17 00:00:00 2001 From: Amit Dutta Date: Sat, 2 Mar 2024 12:45:51 -0800 Subject: [PATCH] Fix build failure by properly forward declaring IcebergDeleteFile. (#8938) Summary: Pull Request resolved: https://github.com/facebookincubator/velox/pull/8938 In `velox/connectors/hive/iceberg/IcebergDeleteFile.h` IcebergDeleteFile is declared as a struct, however in `velox/connectors/hive/iceberg/IcebergSplit.h` its forward declared as a class - which causes build failure in Meta internal system with following error ``` In file included from .../presto-trunk/presto-native-execution/presto_cpp/main/types/PrestoToVeloxSplit.cpp:18: .../velox/connectors/hive/__velox_hive_connector__/buck-headers/velox/connectors/hive/iceberg/IcebergSplit.h:24:1: error: class 'IcebergD eleteFile' was previously declared as a struct; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Werror,-Wmismatched-tags] class IcebergDeleteFile; ^ .../velox/connectors/hive/__velox_hive_connector__/buck-headers/velox/connectors/hive/iceberg/IcebergDeleteFile.h:32:8: note: previous us e is here struct IcebergDeleteFile { ^ buck-out/v2/gen/fbcode/0155eabfa767915a/velox/connectors/hive/__velox_hive_connector__/buck-headers/velox/connectors/hive/iceberg/IcebergSplit.h:24:1: note: did you mean str uct here? class IcebergDeleteFile; ^~~~~ struct ``` Fixing the forward declaration here. Reviewed By: xiaoxmeng, gggrace14 Differential Revision: D54453203 fbshipit-source-id: 19f06487e58b6806a5eaba6d8183fc57a06ca24b --- velox/connectors/hive/iceberg/IcebergSplit.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/velox/connectors/hive/iceberg/IcebergSplit.h b/velox/connectors/hive/iceberg/IcebergSplit.h index 37b8c3c3eb36..05bd70f9820a 100644 --- a/velox/connectors/hive/iceberg/IcebergSplit.h +++ b/velox/connectors/hive/iceberg/IcebergSplit.h @@ -21,7 +21,7 @@ namespace facebook::velox::connector::hive::iceberg { -class IcebergDeleteFile; +struct IcebergDeleteFile; struct HiveIcebergSplit : public connector::hive::HiveConnectorSplit { std::vector deleteFiles;