[ 
https://issues.apache.org/jira/browse/JENA-330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13477407#comment-13477407
 ] 

Stephen Allen commented on JENA-330:
------------------------------------

I was able to address point 3) for the strict SPARQL 1.1 case by changing the 
grammar from:
     Prologue()
     (Update1() ( <SEMICOLON> Update() )? )?
to
     Prologue()
     ( Update1() ( LOOKAHEAD(2) <SEMICOLON> Prologue() ( Update1() )? )* ( 
<SEMICOLON> )? )?


I ran into issues with the "ARQ_UPDATE" that allows optional semicolons.  I 
tried changing:
     Prologue()
     ( Update1() (<SEMICOLON>)*  Update() )?
to:
     Prologue()
     ( Update1() ( (<SEMICOLON>)* Prologue() ( Update1() )? )* )?

But this causes a JavaCC error: "Expansion within "(...)*" can be matched by 
empty string.".  Basically it doesn't like the fact that all parts of that can 
be optional, Prologue, the Semicolon, and the Update1.  I don't know what to do 
here.  Maybe get rid of the optional semicolon and go with just the SPARQL 1.1 
syntax?

Additonally my change to SPARQL 1.1 avoids recursion, but does make it no 
longer a LL(1) parser.  Is there some important reason to keep it LL(1)?  
Because I note that TriplesTemplate() also uses recursion in the SPARQL 1.1 
case to avoid LOOKAHEAD(2).  It seems like we could just live with a LL(2) 
parser for SPARQL 1.1 to avoid recursion.


                
> Streaming support for SPARQL Update queries and streaming support for quads 
> in INSERT DATA / DELETE DATA queries
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: JENA-330
>                 URL: https://issues.apache.org/jira/browse/JENA-330
>             Project: Apache Jena
>          Issue Type: Improvement
>          Components: ARQ
>            Reporter: Stephen Allen
>            Assignee: Stephen Allen
>            Priority: Minor
>         Attachments: config-null.ttl, JENA-330_20121016.patch, 
> TestLargeUpdates.java
>
>
> The SPARQL Update parser currently parses all update queries into a single 
> UpdateRequest object which holds them in memory.  Instead the parser should 
> insert queries into something like a Sink<Update>.  Additionally it should 
> put the quads from INSERT_DATA and DELETE_DATA into a Sink<Quad> instead of 
> an ArrayList.
> This should allow the creation of a streaming update parser, which could be 
> combined with JENA-309 to have full streaming into an underlying 
> transactional store and the ability to handle arbitrarily large INSERT_DATA 
> or DELETE_DATA queries (to the limits of the transaction system).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to