Skip to content

Commit

Permalink
Fixes #413, Fixes #371
Browse files Browse the repository at this point in the history
  • Loading branch information
cnuernber committed Dec 8, 2024
1 parent 73db2e1 commit 6a2e04a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/tech/v3/dataset/impl/dataset.clj
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,9 @@
;;select may be slower if we have to recalculate missing values.
(lznc/map #(ds-proto/select-rows % rowidxs))
(new-dataset (ds-proto/dataset-name dataset)
(dissoc metadata :print-index-range)))))
(if-not (identical? :all (get metadata :print-index-range))
(dissoc metadata :print-index-range)
metadata)))))


ds-proto/PSelectColumns
Expand Down
6 changes: 6 additions & 0 deletions test/tech/v3/dataset_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -1761,6 +1761,12 @@
:y (repeatedly 5 #(java.time.Instant/now))})]
(is (= 3 (count (into [] (take 3) (:y ds)))))))


(deftest issue-432-issue-371
(let [sds (ds/print-all (ds/->dataset {:x (repeatedly 50 rand)}))]
(is (= :all (:print-index-range (meta (ds/sort-by-column sds :x)))))
(is (= :all (:print-index-range (meta (ds/filter-column sds :x pos?)))))))

(comment
(require '[criterium.core :as crit])
(def data (vec (repeatedly 100000 (fn [] {:a (rand-int 20) :b (rand) :c (rand)}))))
Expand Down

0 comments on commit 6a2e04a

Please sign in to comment.