Skip to content

add int64 support the form of a millisecond timestamp #1890

@Janus-Xu

Description

@Janus-Xu

Initial Checks

  • I have searched Google & GitHub for similar requests and couldn't find anything
  • I have read and followed the docs and still think this feature is missing

Description

I use DocArray in Jina, when I set the form of a millisecond timestamp to doc in executor,error as below:

doc = MyDocument(data=int(time.time() * 1000))
proto = doc.to_protobuf()
res_doc = MyDocument.from_protobuf(proto)
print(res_doc)

企业微信截图_17097975573795

I have reviewed the source code and found that NodeProto does not support int64, but the native Google library does have this type.
In our scenario, we need to record millisecond information. Currently, we can only convert it temporarily in the executor using a string, which is very inconvenient. We hope the official support for native types will be provided.

企业微信截图_1709796531658(1)

企业微信截图_17097976244493

Affected Components

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions