diff --git a/src/tech/v3/dataset/impl/dataset.clj b/src/tech/v3/dataset/impl/dataset.clj index 55161f98..5b77c886 100644 --- a/src/tech/v3/dataset/impl/dataset.clj +++ b/src/tech/v3/dataset/impl/dataset.clj @@ -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 diff --git a/test/tech/v3/dataset_test.clj b/test/tech/v3/dataset_test.clj index 4bf759c7..0ded7dd6 100644 --- a/test/tech/v3/dataset_test.clj +++ b/test/tech/v3/dataset_test.clj @@ -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)}))))