Skip to content

Commit d23e013

Browse files
committed
postgresql_loader: Use Numeric type for Arrow UINT64 columns
1 parent b6b232b commit d23e013

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/amp/loaders/implementations/postgresql_loader.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,8 @@ def _create_table_from_schema(self, schema: pa.Schema, table_name: str) -> None:
182182
pa.uint8(): 'SMALLINT',
183183
pa.uint16(): 'INTEGER',
184184
pa.uint32(): 'BIGINT',
185-
pa.uint64(): 'BIGINT',
185+
# Use NUMERIC for uint64 to handle values > 2^63-1 (common in blockchain data)
186+
pa.uint64(): 'NUMERIC(20,0)',
186187
# Floating point types
187188
pa.float32(): 'REAL',
188189
pa.float64(): 'DOUBLE PRECISION',

0 commit comments

Comments
 (0)