Github user afs commented on a diff in the pull request:

    https://github.com/apache/jena/pull/120#discussion_r49173681
  
    --- Diff: 
jena-arq/src/main/java/org/apache/jena/sparql/core/mem/PMapQuadTable.java ---
    @@ -37,13 +39,29 @@
      * use.
      *
      */
    -public abstract class PMapQuadTable extends PMapTupleTable<FourTupleMap, 
Quad>implements QuadTable {
    +public class PMapQuadTable extends PMapTupleTable<FourTupleMap, Quad, 
Consumer4<Node>>implements QuadTable {
    +
    +
    +    private static class QuadTupleMap extends TupleMap {
    +
    +        private QuadTupleMap(final String mappedOrder) {
    +            super(mappedOrder, compileMapping("GSPO", mappedOrder));
    +        }
    +    }
    +
    --- End diff --
    
    I don't see the point of this class (ditto`TripleTupleMap`).
    
    `QuadTupleMap` is passed to the constructor `PMapTupleTable` as a 
`TupleMap`.  A static function will do the same for the `PMapTupleTable` 
constructor.
    ```
    private static Tuplemap makeTupleMap(String mappedOrder)
    { return TupleMap.create("GSPO", mappedOrder) ; }
    ```
    and 
    ```
     public PMapQuadTable(final String order) {
          this(order, makeTupleMap(order));
      }
    ```
    More of a style point but I would make the code general and not hard-code 
GSPO into the index code.  Instead pass in a a pair when the index is made.  
with calls like """make index("GSPO", "SPOG")""".  Then changes to idnexing are 
all in one place.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to