Hi,

DROP clause is part of UPDATE SPARQL specification and  in ARQ queries it is 
processed accordingly with UpdateRequest as well as other UPDATE type requests, 
while SELECT type queries are processed with QueryExecution. So, in a query 
processor code, that accepts arbitrary SPARQL query, one must resolve type of 
the input query first and then apply appropriate class. I do the query type 
resolution as follows:

            Query query = QueryFactory.create(querystr);
            if( query.isAskType() ){
                executeAskSPARQL(querystr,out,outFormat);
            }else if( query.isConstructType() ){
                executeConstructSPARQL(querystr,out,outFormat);
            }else if( query.isDescribeType() ){
                executeDescribeSPARQL(querystr,out,outFormat);
            }else if( query.isSelectType() ){ 
                executeQuerySPARQL(querystr, out, outFormat);
            }else{
                // UPDATE is handled here
                executeUpdateSPARQL(querystr);
            }

However, DROP evaluates true on query.isSelectType() and ends up firing 
exception within executeQuerySPARQL. If DROP is processed by 
executeUpdateSPARQL, as it should be, everithing is fine.

I would say that DROP evaluating true by query.isSelectType() is a bug?

Regards,
Milorad

Reply via email to