hydradatabase / hydra

Hydra: Column-oriented Postgres. Add scalable analytics to your project in minutes.
https://www.hydra.so
Apache License 2.0
2.8k stars 73 forks source link

Avoid calling the get_typlen multiple times #256

Closed japinli closed 3 months ago

japinli commented 5 months ago

This commit also changes the column type length judgment in ReadChunkGroupNextVector(). According to Postgres code, not all platforms have sizeof(Datum) == 8 [1], so it might be better to use sizeof(Datum) instead of the magic number 8.

[1] https://github.com/postgres/postgres/blob/master/src/include/postgres.h#L58