<< Back to previous view

[CRRBV-6] Check whether Iterator implementation correctly implements next by throwing required NoSuchElementException Created: 25/Jun/14  Updated: 25/Jun/14  Resolved: 25/Jun/14

Status: Closed
Project: core.rrb-vector
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Minor
Reporter: Andy Fingerhut Assignee: Michał Marczyk
Resolution: Completed Votes: 0
Labels: None


 Description   

Note: There might not be any bug in core.rrb-vector's implementation of Iterator methods. I have not checked the details yet. Just creating reminder tickets to check if there is an issue in core.rrb-vector similar to CLJ-1453 in Clojure. Please close as declined with a comment if everything is already implemented correctly here, or it is not applicable for some reason.



 Comments   
Comment by Michał Marczyk [ 25/Jun/14 9:05 PM ]

Thanks for the ticket!

There was one implementation throwing the expected NoSuchElementException and three others throwing IndexOutOfBoundsException.

This is now fixed on master:

Test https://github.com/clojure/core.rrb-vector/commit/c45bcf8b06f88bbcac7f9b2bf0ccc20db0b327c6
Fix https://github.com/clojure/core.rrb-vector/commit/faf55bacb8fc0ab798256a975d2b8847d501a993




[CRRBV-5] Error when converting primitive value RRBT Vector to transient Created: 13/Mar/14  Updated: 25/Jun/14  Resolved: 27/Mar/14

Status: Closed
Project: core.rrb-vector
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Major
Reporter: Jozef Wagner Assignee: Michał Marczyk
Resolution: Completed Votes: 0
Labels: None

Attachments: File crrbv-5.diff    

 Description   

When editing primitive RRBT Vector, Exception is thrown about [Object cannot be casted to a primitive array. Problem is in the .editableRoot method, patch is attached.



 Comments   
Comment by Michał Marczyk [ 27/Mar/14 8:53 PM ]

Thanks for the fix!

Committed to master @ https://github.com/clojure/core.rrb-vector/commit/2d10346493b7e877f313faebfd4297a305c9e968





[CRRBV-4] Seq has broken support for reducers Created: 11/Mar/14  Updated: 25/Jun/14  Resolved: 28/Mar/14

Status: Closed
Project: core.rrb-vector
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Major
Reporter: Jozef Wagner Assignee: Michał Marczyk
Resolution: Completed Votes: 0
Labels: None


 Description   

RRB-T Vector uses existing VecSeq for seqs created from it. However, internal reduce in VecSeq is fixed at 32 elements per array, and this cause skipping when RRB-T Vector has different array sized.

user=> (require 'clojure.core.rrb-vector)
nil
user=> (def v1 (clojure.core.rrb-vector/subvec (clojure.core/vec (clojure.core/range 1003)) 500))
#'user/v1
user=> (def v2 (clojure.core/range 500 1003))
#'user/v2
user=> (= v1 v2)
true
user=> (reduce + 0 v1)
377753
user=> (reduce + 0 v2)
377753
user=> (reduce + 0 (clojure.core.reducers/map identity (seq v1)))
366786
user=> (reduce + 0 (clojure.core.reducers/map identity (seq v2)))
377753


 Comments   
Comment by Michał Marczyk [ 28/Mar/14 8:12 PM ]

Fixed as of this commit:

https://github.com/clojure/core.rrb-vector/commit/d8941e8b064bebe2b0f13535d39faeb3341d6459

Thanks for the report!





[CRRBV-3] Add hash tests and hash fixes for Clojure 1.6 Created: 09/Feb/14  Updated: 25/Jun/14  Resolved: 30/Mar/14

Status: Closed
Project: core.rrb-vector
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Enhancement Priority: Minor
Reporter: Andy Fingerhut Assignee: Michał Marczyk
Resolution: Completed Votes: 0
Labels: None

Attachments: File crrbv-3-v1.diff     File crrbv-3-v1-test-only.diff    

 Description   

With the changes planned to hash functions in Clojure 1.6, it would be good to enhance core.rrb-vector so that it continues to work with Clojure 1.5.1, but is prepared to calculate hash functions on its data structures consistent with Clojure 1.6's changes, too.



 Comments   
Comment by Andy Fingerhut [ 09/Feb/14 11:54 PM ]

Patch crrbv-3-v1.diff is one way to update the hash function for Clojure 1.6. I have tested it with the latest Clojure master as of Feb 8 2014, plus the current patches for these tickets:

CLJ-1339, CLJ-1331, CLJ-1335, CLJ-1336, CLJ-1344

It would be best to wait until the patches for these have been applied, and see if any changes are made to them that would affect this patch.

Comment by Michał Marczyk [ 14/Feb/14 1:50 PM ]

See https://github.com/clojure/core.rrb-vector/tree/new-hasheq for a commit using the new hash-ordered-coll.

Comment by Michał Marczyk [ 14/Feb/14 1:52 PM ]

...which is, by the way, broken because of new hashes of empty collections. Will fix in a moment.

Comment by Michał Marczyk [ 14/Feb/14 1:59 PM ]

Ok, seems to work now.

Comment by Andy Fingerhut [ 14/Feb/14 7:41 PM ]

Looks fine to me. It would be nice to add some tests that are run automatically by the build server on every commit to Clojure, rather than having to discover it with a manually run test.

Comment by Andy Fingerhut [ 16/Feb/14 11:50 AM ]

Patch crrbv-3-v1-test-only.diff is identical to crrbv-3-v1.diff, except it only includes additions to the test suite run by 'mvn test', so that whatever problems it catches would be caught by the automated Maven builds done on clojure.org's build machine.

I have verified that with your new-hasheq branch changes and this patch, all of the tests pass with Clojure 1.5.1 and 1.6.0-beta1. Also that without your new-hasheq changes, these tests fail with 1.6.0-beta1, as they should.

Comment by Michał Marczyk [ 30/Mar/14 11:40 AM ]

My new-hasheq branch has been merged to master for a while now.

Also, I applied crrbv-3-v1-test-only.diff to master, then simplified it a bit in the next commit. Thanks!





[CRRBV-2] Efficient reverse resulting in reversed rrb-vector Created: 20/Dec/13  Updated: 20/Dec/13

Status: Open
Project: core.rrb-vector
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Enhancement Priority: Major
Reporter: Gunnar Völkel Assignee: Michał Marczyk
Resolution: Unresolved Votes: 0
Labels: enhancement


 Description   

Is it possible to implement an efficient reverse on a rrb-vector resulting in an rrb-vector? This would be pretty useful in scenarios like the 2-opt neighborhood for local search for the Traveling Salesman Problem. The complete operation is as follows.

Given: a = [a_0, a_1, ..., a_{n-1}, a_{n}, a_{n+1}, ..., a_{n+k-2}, a_{n+k-1}, a_{n+k}, ..., a_{n+k+m-1}]
Goal: [a_0, a_1, ..., a_{n-1}, a_{n+k-1}, a_{n+k-2}, ..., a_{n+1}, a_{n}, a_{n+k}, ..., a_{n+k+m-1}]

Possible Clojure implementation of the described operation:

(let [x (subvec a 0 n), y (subvec a n (+ n k)), z (subvec a (+ n k))]
 (catvec x, (reverse-vec y), z))





[CRRBV-1] Published jars dont appear to contain any .cljs files Created: 21/Oct/13  Updated: 25/Jun/14  Resolved: 04/Jan/14

Status: Closed
Project: core.rrb-vector
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Minor
Reporter: Richard Hull Assignee: Michał Marczyk
Resolution: Completed Votes: 0
Labels: None


 Description   

Neither the 0.0.9 or 0.0.10-SNAPSHOT jar files appear to contain the clojurescript implementation of the rrb vectors code.

As a workaround I can 'lein install' a cloned project to install them in my local .m2 repo, but I assume that there's something missing from the pom deployment process which omits them?



 Comments   
Comment by Michał Marczyk [ 04/Jan/14 2:33 PM ]

Many thanks for the report!

Sorry for the late reaction, I wrongly assumed I'd be notified of CRRBV issues and simply missed it...

This issue has been resolved by commit 3a48a4fb6d9b96d52f0ae8e656f0b51d7449b7ff, released in version 0.0.10.





Generated at Tue Sep 02 09:38:57 CDT 2014 using JIRA 4.4#649-r158309.