Not sure what's going on behind the scenes, sometimes length is 7, 8 or max.
Problem is here, it takes the literal length of the first argument, when no length is passed. As a workaround until this is fixed just pass a large value for length (like this: http://console.neo4j.org/r/vzio2s)
Yeah, the workaround is easy.
Thanks for the link, it's my first time seeing the scala functions. Doesn't look too scary, there's hope yet that I'll be able to make a useful pull request! (not for this though)
So apparently I didn't put any unit tests in for substring of 1 argument. O.o Woops.
Now I have one...
Failed tests: substring_with_default_length(org.neo4j.cypher.ExecutionEngineTest): List(Map(s -> 1234567)) did not equal List(Map(s -> 123456789))
I'll submit a pull request in a bit.
Fixing #369, Cypher bug with substring with no length specified.