Skip to content

Conversation

@pratikpugalia
Copy link
Contributor

Summary:
Add HUGEINT support to MapUnionSumAggregate, which allows IPADDRESS
(a HUGEINT-based type) to be used as map keys in map_union_sum.

Example:

SELECT map_union_sum(m) FROM (
    VALUES
      (MAP(ARRAY[CAST('192.168.1.1' AS IPADDRESS)], ARRAY[10])),
      (MAP(ARRAY[CAST('192.168.1.1' AS IPADDRESS)], ARRAY[5])),
      (MAP(ARRAY[CAST('10.0.0.1' AS IPADDRESS)], ARRAY[20]))
  ) AS t(m)

Differential Revision: D92026528

Summary:
The arbitrary() aggregate function was throwing NOT_IMPLEMENTED when used
with IPADDRESS type. This was caught by the aggregation fuzzer.

This change adds a check for isIPAddressType() for HUGEINT type in
ArbitraryAggregate, allowing IPADDRESS values to be properly handled.

Differential Revision: D92026533
Summary:
Add HUGEINT support to MapUnionSumAggregate, which allows IPADDRESS
(a HUGEINT-based type) to be used as map keys in map_union_sum.

Example:
```sql
SELECT map_union_sum(m) FROM (
    VALUES
      (MAP(ARRAY[CAST('192.168.1.1' AS IPADDRESS)], ARRAY[10])),
      (MAP(ARRAY[CAST('192.168.1.1' AS IPADDRESS)], ARRAY[5])),
      (MAP(ARRAY[CAST('10.0.0.1' AS IPADDRESS)], ARRAY[20]))
  ) AS t(m)
```

Differential Revision: D92026528
@netlify
Copy link

netlify bot commented Feb 2, 2026

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit fa0a4f8
🔍 Latest deploy log https://app.netlify.com/projects/meta-velox/deploys/6980831b9b72c600086fdae1

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 2, 2026
@meta-codesync
Copy link

meta-codesync bot commented Feb 2, 2026

@pratikpugalia has exported this pull request. If you are a Meta employee, you can view the originating Diff in D92026528.

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

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants