Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library may be trying to convert the byte array into a string representation instead of preserving the raw byte data #582

Open
ArunanSivanathan opened this issue Apr 10, 2024 · 2 comments

Comments

@ArunanSivanathan
Copy link

ArunanSivanathan commented Apr 10, 2024

I want to store the following data structure in the Parquet file format:

type FlowInfo struct {
	FirstSeen     int64    `parquet:"name=FirstSeen, type=INT64"`
	RemIP         string   `parquet:"name=RemIP, type=BYTE_ARRAY"`
	Proto         int32    `parquet:"name=Proto, type=INT32"`
	DevPort       int32    `parquet:"name=DevPort, type=INT32"`
	RemPort       int32    `parquet:"name=RemPort, type=INT32"`
	TotalFlowSize int64    `parquet:"name=TotalFlowSize, type=INT64"`
	PacketCount   int64    `parquet:"name=PacketCount, type=INT64"`
	Content       [100]byte `parquet:"name=Content, type=BYTE_ARRAY"`
}

Here, I need to store raw bytes in the Content field. However, when I store the file and read it, the value of the content is written as b'<[100]uint8 Value>' instead of the actual raw bytes. It appears that the library tries to obtain the string representation of the byte array instead of dumping the actual content.

How can I solve this issue?

@knl
Copy link

knl commented May 27, 2024

I see that https://github.com/AppliedIntuition/parquet-go has support for byte slices, but haven't tried it yet

@hangxie
Copy link
Contributor

hangxie commented Jul 6, 2024

It's been raised by people in the past several years and got no response so i guess this will not be supported.

#321
#434
#453
#514

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

No branches or pull requests

3 participants