Skip to content

Commit 12c9a96

Browse files
committed
Release 7.033 && Fixes #434
1 parent 471b526 commit 12c9a96

40 files changed

+67
-52
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# Changelog
2+
# 7.033
3+
* [issue-434](https://github.com/techascent/tech.ml.dataset/issues/413) - bad transit encoding - packed instants are microseconds since epoch and have been for a while - not milliseconds since epoch.
4+
25
# 7.031
36
* [issue-413](https://github.com/techascent/tech.ml.dataset/issues/413) - reduce with packed columns.
47
* [issue-414](https://github.com/techascent/tech.ml.dataset/issues/414) - categorical maps are now integers.

deps.edn

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{:paths ["src" "resources" "target/classes"]
22
:deps {;;org.clojure/clojure {:mvn/version "1.11.1"}
3-
cnuernber/dtype-next {:mvn/version "10.116"}
3+
cnuernber/dtype-next {:mvn/version "10.120"}
44
techascent/tech.io {:mvn/version "4.31"
55
:exclusions [org.apache.commons/commons-compress]}
66
org.apache.datasketches/datasketches-java {:mvn/version "4.2.0"}
@@ -14,7 +14,7 @@
1414
:exec-fn codox.main/-main
1515
:exec-args {:group-id "techascent"
1616
:artifact-id "tech.ml.dataset"
17-
:version "7.032"
17+
:version "7.033"
1818
:name "TMD"
1919
:description "A Clojure high performance data processing system"
2020
:metadata {:doc/format :markdown}

docs/000-getting-started.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/100-walkthrough.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/200-quick-reference.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/columns-readers-and-datatypes.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/index.html

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

docs/nippy-serialization-rocks.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/supported-datatypes.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/tech.v3.dataset.categorical.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/tech.v3.dataset.clipboard.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/tech.v3.dataset.column-filters.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/tech.v3.dataset.column.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/tech.v3.dataset.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/tech.v3.dataset.io.csv.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/tech.v3.dataset.io.datetime.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/tech.v3.dataset.io.string-row-parser.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/tech.v3.dataset.io.univocity.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/tech.v3.dataset.join.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/tech.v3.dataset.math.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/tech.v3.dataset.metamorph.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/tech.v3.dataset.modelling.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/tech.v3.dataset.print.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/tech.v3.dataset.reductions.apache-data-sketch.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/tech.v3.dataset.reductions.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/tech.v3.dataset.rolling.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/tech.v3.dataset.set.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/tech.v3.dataset.tensor.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/tech.v3.dataset.zip.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/tech.v3.libs.arrow.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/tech.v3.libs.clj-transit.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/tech.v3.libs.fastexcel.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/tech.v3.libs.guava.cache.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/tech.v3.libs.parquet.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/tech.v3.libs.poi.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/tech.v3.libs.smile.data.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/tech.v3.libs.tribuo.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

scripts/deploy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -e
44

5-
scripts/run-tests
5+
scripts/run-tests-m1
66
rm -rf pom.xml
77
clojure -T:build jar
88
cp target/classes/META-INF/maven/techascent/tech.ml.dataset/pom.xml .

src/tech/v3/libs/clj_transit.clj

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
(#{:packed-local-date :local-date} col-dt)
142142
(obj-col->numeric-b64 col :int32 dtype-dt/local-date->days-since-epoch)
143143
(#{:packed-instant :instant} col-dt)
144-
(obj-col->numeric-b64 col :int64 dtype-dt/instant->milliseconds-since-epoch)
144+
(obj-col->numeric-b64 col :int64 dtype-dt/instant->microseconds-since-epoch)
145145
:else ;;Punt!!
146146
(vec col))}))
147147

@@ -260,12 +260,12 @@
260260
(def ^{:doc "Transit write handlers for java.time.LocalDate and java.time.Instant"}
261261
java-time-write-handlers
262262
{LocalDate (t/write-handler "java.time.LocalDate" dtype-dt/local-date->days-since-epoch)
263-
Instant (t/write-handler "java.time.Instant" dtype-dt/instant->milliseconds-since-epoch)})
263+
Instant (t/write-handler "java.time.Instant" dtype-dt/instant->microseconds-since-epoch)})
264264

265265
(def ^{:doc "Transit read handlers for java.time.LocalDate and java.time.Instant"}
266266
java-time-read-handlers
267267
{"java.time.LocalDate" (t/read-handler dtype-dt/days-since-epoch->local-date)
268-
"java.time.Instant" (t/read-handler dtype-dt/milliseconds-since-epoch->instant)})
268+
"java.time.Instant" (t/read-handler dtype-dt/microseconds-since-epoch->instant)})
269269

270270

271271
(defn dataset->transit
@@ -315,17 +315,18 @@
315315
(comment
316316
(defn master-ds
317317
[]
318-
(ds/->dataset {:a (mapv double (range 5))
319-
:b (repeat 5 :a)
320-
:c (repeat 5 "hey")
321-
:d (repeat 5 {:a 1 :b 2})
322-
:e (repeat 4 [1 2 3])
323-
:f (repeat 5 (dtype-dt/local-date))
324-
:g (repeat 5 (dtype-dt/instant))
325-
:h [true false true true false]
326-
:i (repeat 5 "text")
327-
:j [1 nil 2 nil 3]}
318+
(ds/->dataset (array-map :a (mapv double (range 5))
319+
:b (repeat 5 :a)
320+
:c (repeat 5 "hey")
321+
:d (repeat 5 {:a 1 :b 2})
322+
:e (repeat 4 [1 2 3])
323+
:f (repeat 5 (dtype-dt/local-date))
324+
:g (repeat 5 (dtype-dt/instant))
325+
:h [true false true true false]
326+
:i (repeat 5 "text")
327+
:j [1 nil 2 nil 3])
328328
{:parser-fn {:i :text}}))
329+
329330

330331

331332
(-> (master-ds)

test/tech/v3/dataset/parse_test.clj

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,17 @@
502502
(is (= (ds :b) (nds :b)))))
503503

504504

505+
(deftest issue-434-transit-support
506+
(let [ds (ds/->dataset {:a [1 2 3]
507+
:b [:one :two :three]
508+
:c [(java.time.Instant/now) (java.time.Instant/now)]})
509+
str-data (ds-transit/dataset->transit-str ds)
510+
nds (ds-transit/transit-str->dataset str-data)]
511+
(is (= (ds :a) (nds :a)))
512+
(is (= (ds :b) (nds :b)))
513+
(is (= (ds :c) (nds :c)))))
514+
515+
505516
(deftest issue-414-json-parser-fn
506517
(is (= [1 2 3] (get (ds/->dataset "test/data/local_date.json"
507518
{:parser-fn {:time-period :local-date}})

0 commit comments

Comments
 (0)