Skip to content

Commit

Permalink
Release 7.034
Browse files Browse the repository at this point in the history
  • Loading branch information
cnuernber committed Nov 16, 2024
1 parent 12c9a96 commit da7fb0c
Show file tree
Hide file tree
Showing 40 changed files with 62 additions and 44 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Changelog
#7.034
* Reverted transit encoding of instant back to milliseconds since epoch as js api doesn't support microseconds since epoch.

# 7.033
* [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.

Expand Down
4 changes: 2 additions & 2 deletions deps.edn
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{:paths ["src" "resources" "target/classes"]
:deps {;;org.clojure/clojure {:mvn/version "1.11.1"}
cnuernber/dtype-next {:mvn/version "10.120"}
cnuernber/dtype-next {:mvn/version "10.122"}
techascent/tech.io {:mvn/version "4.31"
:exclusions [org.apache.commons/commons-compress]}
org.apache.datasketches/datasketches-java {:mvn/version "4.2.0"}
Expand All @@ -14,7 +14,7 @@
:exec-fn codox.main/-main
:exec-args {:group-id "techascent"
:artifact-id "tech.ml.dataset"
:version "7.033"
:version "7.034"
:name "TMD"
:description "A Clojure high performance data processing system"
:metadata {:doc/format :markdown}
Expand Down
2 changes: 1 addition & 1 deletion docs/000-getting-started.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/100-walkthrough.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/200-quick-reference.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/columns-readers-and-datatypes.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/nippy-serialization-rocks.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/supported-datatypes.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.dataset.categorical.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.dataset.clipboard.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.dataset.column-filters.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.dataset.column.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.dataset.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.dataset.io.csv.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.dataset.io.datetime.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.dataset.io.string-row-parser.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.dataset.io.univocity.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.dataset.join.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.dataset.math.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.dataset.metamorph.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.dataset.modelling.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.dataset.print.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.dataset.reductions.apache-data-sketch.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.dataset.reductions.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.dataset.rolling.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.dataset.set.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.dataset.tensor.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.dataset.zip.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.libs.arrow.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.libs.clj-transit.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.libs.fastexcel.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.libs.guava.cache.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.libs.parquet.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.libs.poi.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.libs.smile.data.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.libs.tribuo.html

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions scripts/enable-jdk21-m1
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash


VERSION="21.0.2"

if [ ! -e jdk-$VERSION ]; then
echo "Downloading JDK $VERSION"
wget https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/13/GPL/openjdk-21.0.2_macos-aarch64_bin.tar.gz
tar -xvzf openjdk-21.0.2_macos-aarch64_bin.tar.gz
rm openjdk-21.0.2_macos-aarch64_bin.tar.gz
fi

export PATH=$(pwd)/jdk-$VERSION/bin:$PATH
export JAVA_HOME=$(pwd)/jdk-$VERSION/
10 changes: 5 additions & 5 deletions src/tech/v3/libs/clj_transit.clj
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@
(text-col->data col)
(#{:packed-local-date :local-date} col-dt)
(obj-col->numeric-b64 col :int32 dtype-dt/local-date->days-since-epoch)
(#{:packed-instant :instant} col-dt)
(obj-col->numeric-b64 col :int64 dtype-dt/instant->microseconds-since-epoch)
(#{:packed-instant :instant :packed-milli-instant} col-dt)
(obj-col->numeric-b64 col :int64 dtype-dt/instant->milliseconds-since-epoch)
:else ;;Punt!!
(vec col))}))

Expand Down Expand Up @@ -238,7 +238,7 @@
(= :instant dtype)
(-> (b64->numeric-data data :int64)
(dtype/->array-buffer)
(abuf/set-datatype :packed-instant))
(abuf/set-datatype :packed-milli-instant))
:else
(dtype/make-container dtype data))
:name (:name metadata)})))
Expand All @@ -260,12 +260,12 @@
(def ^{:doc "Transit write handlers for java.time.LocalDate and java.time.Instant"}
java-time-write-handlers
{LocalDate (t/write-handler "java.time.LocalDate" dtype-dt/local-date->days-since-epoch)
Instant (t/write-handler "java.time.Instant" dtype-dt/instant->microseconds-since-epoch)})
Instant (t/write-handler "java.time.Instant" dtype-dt/instant->milliseconds-since-epoch)})

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


(defn dataset->transit
Expand Down
3 changes: 2 additions & 1 deletion test/tech/v3/dataset/parse_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,8 @@
(deftest issue-434-transit-support
(let [ds (ds/->dataset {:a [1 2 3]
:b [:one :two :three]
:c [(java.time.Instant/now) (java.time.Instant/now)]})
;;transit encoding is milli instants
:c (dtype/make-container :packed-milli-instant [(java.time.Instant/now) (java.time.Instant/now)])})
str-data (ds-transit/dataset->transit-str ds)
nds (ds-transit/transit-str->dataset str-data)]
(is (= (ds :a) (nds :a)))
Expand Down

0 comments on commit da7fb0c

Please sign in to comment.