Skip to content

Commit

Permalink
Fixes #401 - min/max values are incorrectly filled out.
Browse files Browse the repository at this point in the history
  • Loading branch information
cnuernber committed Mar 6, 2024
1 parent 087214d commit 5dfaa12
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/tech/v3/libs/parquet.clj
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,8 @@ org.xerial.snappy/snappy-java {:mvn/version \"1.1.8.4\"}
(let [col-min (long col-min)
col-max (long col-max)]
(cond
;;Default min/max values are 0,0
(== col-min col-max) :int32
(byte-range? col-min col-max) :int8
(ubyte-range? col-min col-max) :uint8
(short-range? col-min col-max) :int16
Expand Down
Binary file added test/data/2024-03-03.parquet
Binary file not shown.
4 changes: 4 additions & 0 deletions test/tech/v3/libs/parquet_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,7 @@
(let [table (ds/->dataset "test/data/decimaltable.parquet")
decimals (table "decimals")]
(is (dfn/equals [3.420 1.246] decimals))))


(deftest issue-401-paruet-missing-column
(is (= 4 (ds/column-count (ds/->dataset "test/data/2024-03-03.parquet")))))

0 comments on commit 5dfaa12

Please sign in to comment.