File tree Expand file tree Collapse file tree 5 files changed +12
-8
lines changed
Expand file tree Collapse file tree 5 files changed +12
-8
lines changed Original file line number Diff line number Diff line change 22 " An int-list implementation that resizes its backing store as it is required to hold
33 wider data."
44 (:require [tech.v3.datatype.protocols :as dtype-proto]
5+ [tech.v3.datatype.hamf-proto :as dtype-hamf-proto]
56 [tech.v3.datatype :as dtype]
67 [tech.v3.datatype.base :as dtype-base]
78 [tech.v3.datatype.errors :as errors]
4445 (->native-buffer [_item]
4546 (dtype-proto/->native-buffer backing-store))
4647 LongBuffer
47- (elemwiseDatatype [_this] (dtype-proto /elemwise-datatype backing-store))
48+ (elemwiseDatatype [_this] (dtype/elemwise-datatype backing-store))
4849 (clear [this]
4950 (set! backing-store (abuf/as-growable-list (dtype/make-list :int8 1500 ) 0 ))
5051 (set! int-width 8 ))
Original file line number Diff line number Diff line change 421421 (invoke [this idx def-val ] (.invoke (cached-buffer! ) idx def-val ))
422422 (meta [this] (assoc metadata
423423 :datatype (dtype-hamf-proto/elemwise-datatype this)
424- :n-elems (dtype-proto/ecount this)))
424+ :n-elems (.size this)))
425425 (withMeta [_this new-meta] (Column. missing
426426 data
427427 new-meta
Original file line number Diff line number Diff line change 11(ns tech.v3.dataset.protocols
22 (:require [tech.v3.datatype.protocols :as dtype-proto]
3- [ham-fisted.protocols :as hamf-proto])
3+ [ham-fisted.protocols :as hamf-proto]
4+ [tech.v3.datatype :as dtype])
45 (:import [org.roaringbitmap RoaringBitmap]
56 [tech.v3.datatype Buffer]
67 [clojure.lang IDeref])
7475 PColumn
7576 (is-column? [item] false )
7677 PRowCount
77- (row-count [this] (dtype-proto /ecount this))
78+ (row-count [this] (dtype/ecount this))
7879 PColumnCount
7980 (column-count [this] 0 )
8081 PMissing
Original file line number Diff line number Diff line change 2020```"
2121 (:require [tech.v3.io :as io]
2222 [tech.v3.datatype.protocols :as dtype-proto]
23+ [tech.v3.datatype.hamf-proto :as dtype-hamf-proto]
2324 [tech.v3.datatype :as dtype]
2425 [tech.v3.datatype.errors :as errors]
2526 [tech.v3.dataset.io.spreadsheet :as parse-spreadsheet]
5960(defn- wrap-cell
6061 [^Cell cell]
6162 (reify
62- dtype-proto/PElemwiseDatatype
63+ dtype-hamf- proto/PElemwiseDatatype
6364 (elemwise-datatype [this]
6465 (let [cell-type (.getType cell)]
6566 (if (formula-type? cell-type)
7374 (value [this]
7475 (if (formula-type? (.getType cell))
7576 (try-parse-double cell)
76- (case (dtype-proto /elemwise-datatype this)
77+ (case (dtype/elemwise-datatype this)
7778 :none nil
7879 :string (.getRawValue cell)
7980 :boolean (.asBoolean cell)
Original file line number Diff line number Diff line change 1818 (:require [tech.v3.io :as io]
1919 [tech.v3.datatype :as dtype]
2020 [tech.v3.datatype.protocols :as dtype-proto]
21+ [tech.v3.datatype.hamf-proto :as dtype-hamf-proto]
2122 [tech.v3.datatype.errors :as errors]
2223 [tech.v3.datatype.datetime :as dtype-dt]
2324 [tech.v3.dataset.io.spreadsheet :as parse-spreadsheet]
4748(defn- wrap-cell
4849 [^Cell cell]
4950 (reify
50- dtype-proto/PElemwiseDatatype
51+ dtype-hamf- proto/PElemwiseDatatype
5152 (elemwise-datatype [this]
5253 (let [cell-type (.getCellType cell)]
5354 (if (or (= cell-type CellType/FORMULA)
6263 (getColumnNum [this] (.. cell getAddress getColumn))
6364 (missing [this] (identical? :none (dtype/get-datatype this)))
6465 (value [this]
65- (case (dtype-proto /elemwise-datatype this)
66+ (case (dtype/elemwise-datatype this)
6667 :none nil
6768 :string (.getStringCellValue cell)
6869 :boolean (.getBooleanCellValue cell)
You can’t perform that action at this time.
0 commit comments