irstv/H2GIS — pull request #396 by agouge (2014-08-27 13:59:26+00:00)
Title: Allow separate SOURCE, DESTINATION tables in ST_ShortestPathLength

As requested by @ebocher, we had two signatures to `ST_ShortestPathLength`:

```mysql
ST_ShortestPathLength('INPUT', 'O [- EO]', 'ST', 'DT');
ST_ShortestPathLength('INPUT', 'O [- EO]', 'W', 'ST', 'DT');
```

where

* `ST` = Source table
* `DT` = Destination table

Both of these tables must have as their first column a column of integers
corresponding to vertex IDs in the graph.

We throw exceptions if:
* Either table is empty
* Either table contains a vertex id corresponding to a vertex the graph does not
contain

Notice that the first signature conflicts with the previous signature

```mysql
ST_ShortestPathLength('INPUT', 'O [- EO]', 'W', 'SDT');
```

To resolve this, I check if table `INPUT` contains the String in position 3
using the new `JDBCUtilities.hasField` method. If so, then this String
corresponds to the weight field `W`. Otherwise, we assume it corresponds to
`ST`.

Unit tests added.