← 返回首页
INT64 uses "C long" type in struct.pack which is 4 bytes. · Issue #2345 · feast-dev/feast · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

INT64 uses "C long" type in struct.pack which is 4 bytes. #2345

New issue
New issue

Description

Expected Behavior

INT64 should be packed as "C long long" to have 64 bits memory capacity.

Current Behavior

INT64 is packed as "C long" which is 32 bits

Steps to reproduce

Materialization of entities with IDs larger than supported range of "C long" raises exception.

Specifications

The bug is in the _serialize_val function in key_encoding_utils.

def _serialize_val(value_type, v: ValueProto) -> Tuple[bytes, int]: if value_type == "string_val": return v.string_val.encode("utf8"), ValueType.STRING elif value_type == "bytes_val": return v.bytes_val, ValueType.BYTES elif value_type == "int32_val": return struct.pack("<i", v.int32_val), ValueType.INT32 elif value_type == "int64_val": return struct.pack("<q", v.int64_val), ValueType.INT64 else: raise ValueError(f"Value type not supported for Firestore: {v}")
  • Version:
  • feast: 0.18.1
  • Platform:
  • MacOS 12.0.1
  • Subsystem:
  • python: 3.8.1

Possible Solution

changing struct.pack("<l", v.int64_val), ValueType.INT64 to struct.pack("<q", v.int64_val), ValueType.INT64 fixes this.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Footer

      © 2026 GitHub, Inc.