Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

print-all is busted #346

Closed
harold opened this issue Jan 17, 2023 · 2 comments
Closed

print-all is busted #346

harold opened this issue Jan 17, 2023 · 2 comments

Comments

@harold
Copy link
Contributor

harold commented Jan 17, 2023

user> (tech.v3.dataset/->dataset [{:a 1}])
_unnamed [1 1]:

| :a |
|---:|
|  1 |
user> (tech.v3.dataset/print-all (tech.v3.dataset/->dataset [{:a 1}]))
Error printing return value at ham-fisted.impl/eval10376$fn (impl.clj:289).
Item is not iterable: class clojure.lang.Keyword

I think the assumption here that everything is a long is suspect, but perhaps I'm misunderstanding.

print-ds (ds-proto/select-rows dataset
(lznc/filter
(hamf/long-predicate
idx (and (< idx n-rows)
(>= idx (- n-rows))))
index-range))

harold added a commit that referenced this issue Jan 18, 2023
@harold
Copy link
Contributor Author

harold commented Jan 18, 2023

Added a failing test:

$ ./scripts/run-tests 

...

Testing tech.v3.dataset-test

ERROR in (print-all-test) (impl.clj:289)
expected: (> (count (with-out-str (println (ds/print-all ds)))) 1000)
09:37:09.412 [main] WARN tech.v3.dataset.missing - Column has no values and strategy (:value) is dependent upon existing values
  actual: java.lang.RuntimeException: Item is not iterable: class clojure.lang.Keyword
 at ham_fisted.impl$eval2066$fn__2070.invoke (impl.clj:289)
    ham_fisted.protocols$eval1019$fn__1031$G__1010__1036.invoke (protocols.clj:11)
    ham_fisted.lazy_noncaching$filter.invokeStatic (lazy_noncaching.clj:223)
    ham_fisted.lazy_noncaching$filter.invoke (lazy_noncaching.clj:213)
    tech.v3.dataset.print$dataset_data__GT_str.invokeStatic (print.clj:215)
    tech.v3.dataset.print$dataset_data__GT_str.invoke (print.clj:95)
    tech.v3.dataset.print$dataset__GT_str.invokeStatic (print.clj:321)
    tech.v3.dataset.print$dataset__GT_str.invoke (print.clj:306)
    tech.v3.dataset.print$dataset__GT_str.invokeStatic (print.clj:323)
    tech.v3.dataset.print$dataset__GT_str.invoke (print.clj:306)
    tech.v3.dataset.impl.dataset.Dataset.toString (dataset.clj:416)
    tech.v3.dataset.impl.dataset$eval14072$fn__14073.invoke (dataset.clj:490)
    clojure.lang.MultiFn.invoke (MultiFn.java:234)
    clojure.core$pr_on.invokeStatic (core.clj:3675)
    clojure.core$pr.invokeStatic (core.clj:3678)
    clojure.core$pr.invoke (core.clj:3678)
    clojure.lang.AFn.applyToHelper (AFn.java:154)
    clojure.lang.RestFn.applyTo (RestFn.java:132)
    clojure.core$apply.invokeStatic (core.clj:667)
    clojure.core$prn.invokeStatic (core.clj:3715)
    clojure.core$prn.doInvoke (core.clj:3715)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.core$apply.invokeStatic (core.clj:667)
    clojure.core$println.invokeStatic (core.clj:3734)
    clojure.core$println.doInvoke (core.clj:3734)
    clojure.lang.RestFn.invoke (RestFn.java:408)
    tech.v3.dataset_test$fn__55918$fn__55936.invoke (dataset_test.clj:1575)
    tech.v3.dataset_test$fn__55918.invokeStatic (dataset_test.clj:1575)
    tech.v3.dataset_test/fn (dataset_test.clj:1571)
...

@harold
Copy link
Contributor Author

harold commented Jan 19, 2023

👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant