Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
I managed to run the query without getting the error but it still seems like there is some strange behaviour going on. I pass all the tests except for the last random one (Find Inventory Changes (Randomized Data) validates the query against multiple random date combinations.
In general, I think you were on the right track with the nulls - returning a NULL generates the initial error.
Another possibility is that you return no rows (i.e. an empty result set) when there should be some.
Sounds good and thanks for the quick response. As far as I can tell, nulls are not being returned but I'll give it another look in a little bit. To add some info, this what comes back from the backtrace:
./spec/query_spec.rb:168:in
map' ./spec/query_spec.rb:168:in
format_output'./spec/query_spec.rb:158:in
block (3 levels) in <top (required)>' ./spec/query_spec.rb:127:in
times'./spec/query_spec.rb:127:in
block (2 levels) in <top (required)>' ./spec/query_spec.rb:6:in
block (3 levels) in <top (required)>'/usr/local/bundle/gems/sequel-5.47.0/lib/sequel/database/transactions.rb:251:in
_transaction' /usr/local/bundle/gems/sequel-5.47.0/lib/sequel/database/transactions.rb:233:in
block in transaction'/usr/local/bundle/gems/sequel-5.47.0/lib/sequel/connection_pool/threaded.rb:92:in
hold' /usr/local/bundle/gems/sequel-5.47.0/lib/sequel/database/connecting.rb:269:in
synchronize'/usr/local/bundle/gems/sequel-5.47.0/lib/sequel/database/transactions.rb:195:in
transaction' ./spec/query_spec.rb:5:in
block (2 levels) in <top (required)>'One reason for this error could be that you returned
NULL
in a column which expects a value. Make sure your query returns noNULL
s and try again.Nonetheless, the error sohuld be fixed, because tests should not crash like that on unexpected values.
I can't complete as I'm getting this error: ./spec/query_spec.rb:169:in
block in format_output': undefined method
ljust' for nil:NilClass (NoMethodError)Any idea what is going on?