Skip to content

Commit

Permalink
Fix build failure by properly forward declaring IcebergDeleteFile. (#…
Browse files Browse the repository at this point in the history
…8938)

Summary:
Pull Request resolved: #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
  • Loading branch information
amitkdutta authored and facebook-github-bot committed Mar 2, 2024
1 parent f391c02 commit e4f33f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion velox/connectors/hive/iceberg/IcebergSplit.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

namespace facebook::velox::connector::hive::iceberg {

class IcebergDeleteFile;
struct IcebergDeleteFile;

struct HiveIcebergSplit : public connector::hive::HiveConnectorSplit {
std::vector<IcebergDeleteFile> deleteFiles;
Expand Down

0 comments on commit e4f33f4

Please sign in to comment.