Skip to content

fix: move int128_t and uint128_t aliases into the iceberg namespace - #972

Open
rohanjain101 wants to merge 1 commit into
apache:mainfrom
rohanjain101:users/rohanjain/int128-namespace
Open

rohanjain101 wants to merge 1 commit into
apache:mainfrom
rohanjain101:users/rohanjain/int128-namespace

Conversation

@rohanjain101

Copy link
Copy Markdown

What

Move the int128_t / uint128_t aliases in the public header iceberg/util/int128.h from the global namespace
into namespace iceberg.

Why

int128.h is installed and reached transitively from public headers such as iceberg/util/decimal.h and
iceberg/expression/literal.h. Because the aliases are global, any consumer that includes an iceberg header gets
global int128_t and uint128_t names. Those conflict with other libraries or application code that declare the
same names with a different underlying type (for example, a project that defines its own int128_t on MSVC).

Compatibility

Every use in the project is already inside namespace iceberg, and nothing refers to ::int128_t, so this is source
compatible within the project. External code that relied on the global names would need iceberg::int128_t.

The platform check is unchanged: MSVC still includes <__msvc_int128.hpp> and other compilers must be GCC or Clang.

The aliases were declared at global scope in the public header iceberg/util/int128.h. Any consumer that includes an iceberg header then gets global int128_t and uint128_t names, which conflict with other libraries or application code that define the same names. All uses in the project are already inside namespace iceberg, so this change is source compatible within the project.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant