You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Mark Roth <Ma...@twosigma.com> on 2012/03/08 23:28:16 UTC

SDB - Microsoft SQL Server support? But what about LIMIT and OFFSET?

According to [1], SDB supports Microsoft SQL Server. However, when I follow the instructions and run the test suite, all the Slice tests fail with com.hp.hpl.jena.sdb.test.junit.QueryTestSDB: "SQLException in executing SQL statement". When I debug further, I see that this is because SQL statements are being executed with LIMIT and OFFSET keywords, which are not supported by Microsoft SQL Server (OFFSET is coming in SQL Server 2012, though). I checked the code and I'm not sure how this would have ever worked with Microsoft SQL Server.

Is this database engine really supported? How important are the "Slice" tests to the functionality of the server? Is there a way to switch off functionality such that LIMIT and OFFSET queries are never sent to the DB server?

It's relatively easy to patch the code to use "SELECT TOP" instead of "LIMIT" but to replace "OFFSET" with something like "SELECT ROW_NUMBER() ..." requires that there is a consistent ordering of the rows so I don't see an easy patch. I'd be willing to work on one if someone gave me some direction of what needed to be patched.

Thanks,

-          Mark

[1] http://incubator.apache.org/jena/documentation/sdb/databases_supported.html


Re: SDB - Microsoft SQL Server support? But what about LIMIT and OFFSET?

Posted by Robert Vesse <rv...@yarcdata.com>.
Hi Mark

Thanks for the patch

I just got back from vacation and am trying to clear my email backlog right now, I will hopefully get time to test and verify this patch by the weekend (if not sooner)

Rob

On Mar 12, 2012, at 3:06 PM, Mark Roth wrote:

> I posted the patch to JENA-219. I'm using SDB 1.3.4 but I created the patch off trunk.
> 
> - Mark
> 
> -----Original Message-----
> From: Andy Seaborne [mailto:andy.seaborne.apache@gmail.com] On Behalf Of Andy Seaborne
> Sent: Friday, March 09, 2012 5:33 AM
> To: jena-users@incubator.apache.org
> Subject: Re: SDB - Microsoft SQL Server support? But what about LIMIT and OFFSET?
> 
> On 09/03/12 04:15, Mark Roth wrote:
>> I've filed issue JENA-219 to track this.
>> 
>> https://issues.apache.org/jira/browse/JENA-219
>> 
>> I also have a patch that fixes it. Will post once it's cleaned up a bit.
> 
> Excellent news.
> 
> Which version of SDB are you using?
> 
> 	Andy
> 
>> 
>> 
>> -          Mark
>> 
>> From: Mark Roth
>> Sent: Thursday, March 08, 2012 5:28 PM
>> To: 'jena-users@incubator.apache.org'
>> Subject: SDB - Microsoft SQL Server support? But what about LIMIT and OFFSET?
>> 
>> According to [1], SDB supports Microsoft SQL Server. However, when I follow the instructions and run the test suite, all the Slice tests fail with com.hp.hpl.jena.sdb.test.junit.QueryTestSDB: "SQLException in executing SQL statement". When I debug further, I see that this is because SQL statements are being executed with LIMIT and OFFSET keywords, which are not supported by Microsoft SQL Server (OFFSET is coming in SQL Server 2012, though). I checked the code and I'm not sure how this would have ever worked with Microsoft SQL Server.
>> 
>> Is this database engine really supported? How important are the "Slice" tests to the functionality of the server? Is there a way to switch off functionality such that LIMIT and OFFSET queries are never sent to the DB server?
>> 
>> It's relatively easy to patch the code to use "SELECT TOP" instead of "LIMIT" but to replace "OFFSET" with something like "SELECT ROW_NUMBER() ..." requires that there is a consistent ordering of the rows so I don't see an easy patch. I'd be willing to work on one if someone gave me some direction of what needed to be patched.
>> 
>> Thanks,
>> 
>> -          Mark
>> 
>> [1] http://incubator.apache.org/jena/documentation/sdb/databases_supported.html
>> 
>> 
> 


RE: SDB - Microsoft SQL Server support? But what about LIMIT and OFFSET?

Posted by Mark Roth <Ma...@twosigma.com>.
I posted the patch to JENA-219. I'm using SDB 1.3.4 but I created the patch off trunk.

- Mark

-----Original Message-----
From: Andy Seaborne [mailto:andy.seaborne.apache@gmail.com] On Behalf Of Andy Seaborne
Sent: Friday, March 09, 2012 5:33 AM
To: jena-users@incubator.apache.org
Subject: Re: SDB - Microsoft SQL Server support? But what about LIMIT and OFFSET?

On 09/03/12 04:15, Mark Roth wrote:
> I've filed issue JENA-219 to track this.
>
> https://issues.apache.org/jira/browse/JENA-219
>
> I also have a patch that fixes it. Will post once it's cleaned up a bit.

Excellent news.

Which version of SDB are you using?

	Andy

>
>
> -          Mark
>
> From: Mark Roth
> Sent: Thursday, March 08, 2012 5:28 PM
> To: 'jena-users@incubator.apache.org'
> Subject: SDB - Microsoft SQL Server support? But what about LIMIT and OFFSET?
>
> According to [1], SDB supports Microsoft SQL Server. However, when I follow the instructions and run the test suite, all the Slice tests fail with com.hp.hpl.jena.sdb.test.junit.QueryTestSDB: "SQLException in executing SQL statement". When I debug further, I see that this is because SQL statements are being executed with LIMIT and OFFSET keywords, which are not supported by Microsoft SQL Server (OFFSET is coming in SQL Server 2012, though). I checked the code and I'm not sure how this would have ever worked with Microsoft SQL Server.
>
> Is this database engine really supported? How important are the "Slice" tests to the functionality of the server? Is there a way to switch off functionality such that LIMIT and OFFSET queries are never sent to the DB server?
>
> It's relatively easy to patch the code to use "SELECT TOP" instead of "LIMIT" but to replace "OFFSET" with something like "SELECT ROW_NUMBER() ..." requires that there is a consistent ordering of the rows so I don't see an easy patch. I'd be willing to work on one if someone gave me some direction of what needed to be patched.
>
> Thanks,
>
> -          Mark
>
> [1] http://incubator.apache.org/jena/documentation/sdb/databases_supported.html
>
>


Re: SDB - Microsoft SQL Server support? But what about LIMIT and OFFSET?

Posted by Andy Seaborne <an...@apache.org>.
On 09/03/12 04:15, Mark Roth wrote:
> I've filed issue JENA-219 to track this.
>
> https://issues.apache.org/jira/browse/JENA-219
>
> I also have a patch that fixes it. Will post once it's cleaned up a bit.

Excellent news.

Which version of SDB are you using?

	Andy

>
>
> -          Mark
>
> From: Mark Roth
> Sent: Thursday, March 08, 2012 5:28 PM
> To: 'jena-users@incubator.apache.org'
> Subject: SDB - Microsoft SQL Server support? But what about LIMIT and OFFSET?
>
> According to [1], SDB supports Microsoft SQL Server. However, when I follow the instructions and run the test suite, all the Slice tests fail with com.hp.hpl.jena.sdb.test.junit.QueryTestSDB: "SQLException in executing SQL statement". When I debug further, I see that this is because SQL statements are being executed with LIMIT and OFFSET keywords, which are not supported by Microsoft SQL Server (OFFSET is coming in SQL Server 2012, though). I checked the code and I'm not sure how this would have ever worked with Microsoft SQL Server.
>
> Is this database engine really supported? How important are the "Slice" tests to the functionality of the server? Is there a way to switch off functionality such that LIMIT and OFFSET queries are never sent to the DB server?
>
> It's relatively easy to patch the code to use "SELECT TOP" instead of "LIMIT" but to replace "OFFSET" with something like "SELECT ROW_NUMBER() ..." requires that there is a consistent ordering of the rows so I don't see an easy patch. I'd be willing to work on one if someone gave me some direction of what needed to be patched.
>
> Thanks,
>
> -          Mark
>
> [1] http://incubator.apache.org/jena/documentation/sdb/databases_supported.html
>
>


RE: SDB - Microsoft SQL Server support? But what about LIMIT and OFFSET?

Posted by Mark Roth <Ma...@twosigma.com>.
I've filed issue JENA-219 to track this.

https://issues.apache.org/jira/browse/JENA-219

I also have a patch that fixes it. Will post once it's cleaned up a bit.


-          Mark

From: Mark Roth
Sent: Thursday, March 08, 2012 5:28 PM
To: 'jena-users@incubator.apache.org'
Subject: SDB - Microsoft SQL Server support? But what about LIMIT and OFFSET?

According to [1], SDB supports Microsoft SQL Server. However, when I follow the instructions and run the test suite, all the Slice tests fail with com.hp.hpl.jena.sdb.test.junit.QueryTestSDB: "SQLException in executing SQL statement". When I debug further, I see that this is because SQL statements are being executed with LIMIT and OFFSET keywords, which are not supported by Microsoft SQL Server (OFFSET is coming in SQL Server 2012, though). I checked the code and I'm not sure how this would have ever worked with Microsoft SQL Server.

Is this database engine really supported? How important are the "Slice" tests to the functionality of the server? Is there a way to switch off functionality such that LIMIT and OFFSET queries are never sent to the DB server?

It's relatively easy to patch the code to use "SELECT TOP" instead of "LIMIT" but to replace "OFFSET" with something like "SELECT ROW_NUMBER() ..." requires that there is a consistent ordering of the rows so I don't see an easy patch. I'd be willing to work on one if someone gave me some direction of what needed to be patched.

Thanks,

-          Mark

[1] http://incubator.apache.org/jena/documentation/sdb/databases_supported.html