The scala split takes a string which represents a regex. I don't see any
way to tell that it shouldn't be used as a regex. What do you mean with
type checking?
On Feb 10, 2014 4:56 PM, "Chris Leishman" <notifications@github.com> wrote:

> In
> community/cypher/cypher-compiler-2.0/src/main/scala/org/neo4j/cypher/internal/compiler/v2_0/commands/expressions/StringFunctions.scala:
>
> > +  def compute(value: Any, m: ExecutionContext)(implicit state: QueryState): Any = {
> > +    val origVal = asString(orig(m))
> > +    val splitPatternVal = asString(splitPattern(m))
> > +
> > +    if (origVal == null || splitPatternVal == null) {
> > +      null
> > +    } else {
> > +      if (splitPatternVal.length > 0) {
> > +        split(origVal, splitPatternVal)
> > +      } else {
> > +        throw new IllegalArgumentException("The split pattern must not be an empty string")
> > +      }
> > +    }
> > +  }
> > +
> > +  private def split(orig: String, splitPattern: String): Seq[String] = {
>
> Where is the regex version? Isn't this just a type check issue?
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/neo4j/neo4j/pull/1926/files#r9588597>
> .
>