You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "A B (JIRA)" <de...@db.apache.org> on 2005/06/03 18:00:16 UTC
[jira] Created: (DERBY-334) Add initial SQL support for XML datatype/functions in Derby, based on SQL/XML specs.
Add initial SQL support for XML datatype/functions in Derby, based on SQL/XML specs.
-------------------------------------------------------------------------------------
Key: DERBY-334
URL: http://issues.apache.org/jira/browse/DERBY-334
Project: Derby
Type: New Feature
Components: SQL
Versions: 10.1.0.0
Reporter: A B
Assigned to: A B
Fix For: 10.1.0.0
Adding some "starter" XML functionality to Derby, which can then serve as the basis for future XML development. Initial features include the following:
1 - A built-in XML datatype.
2 - An XMLPARSE() operator for creating XML values.
3 - An XMLSERIALIZE() operator for serializing XML values to strings (for data retrieval).
4 - An XMLEXISTSTS() operator for running simple existence queries against XML using XPath.
These features are implemented at the SQL level only (no JDBC support). See the email here for a more detailed description:
http://thread.gmane.org/gmane.comp.apache.db.derby.devel/4468
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Resolved: (DERBY-334) Add initial SQL support for XML datatype/functions in Derby, based on SQL/XML specs.
Posted by "A B (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-334?page=all ]
A B resolved DERBY-334:
-----------------------
Resolution: Fixed
Version 4 of this patch was committed by Satheesh with svn revision 189721. That said, the derby-dev list suggests that at least one person is still planning to review this patch, so while I'm going to mark this issue as Resolved, I'm _not_ marking it as closed until I hear back from all who want to review. It's already clear that some follow-up work is going to be needed (ex. create a new XML test suite, and throw a graceful error for users who try to use XML but don't have the required XML classes in their classpath), but those issues will be addressed in another JIRA issue with another patch for 10.2.
> Add initial SQL support for XML datatype/functions in Derby, based on SQL/XML specs.
> -------------------------------------------------------------------------------------
>
> Key: DERBY-334
> URL: http://issues.apache.org/jira/browse/DERBY-334
> Project: Derby
> Type: New Feature
> Components: SQL
> Versions: 10.1.0.0
> Reporter: A B
> Assignee: A B
> Fix For: 10.1.0.0
> Attachments: derby-xml_v4.patch, derby-xml_v4.stat
>
> Adding some "starter" XML functionality to Derby, which can then serve as the basis for future XML development. Initial features include the following:
> 1 - A built-in XML datatype.
> 2 - An XMLPARSE() operator for creating XML values.
> 3 - An XMLSERIALIZE() operator for serializing XML values to strings (for data retrieval).
> 4 - An XMLEXISTSTS() operator for running simple existence queries against XML using XPath.
> These features are implemented at the SQL level only (no JDBC support). See the email here for a more detailed description:
> http://thread.gmane.org/gmane.comp.apache.db.derby.devel/4468
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
Re: [jira] Updated: (DERBY-334) Add initial SQL support for XML
datatype/functions in Derby, based on SQL/XML specs.
Posted by "Lance J. Andersen" <La...@Sun.COM>.
At somepoint, it would be worthwhile to discuss which J2SE versions to
support.
Satheesh Bandaram wrote:
>On the similar lines, I also think the XML support should turn itself
>OFF gracefully in environments that don't support XML. I think the patch
>requires JDK 1.4 or higher, so unless Derby has plans to end_of_line JDK
>1.3 (not sure if there is a plan), it may be a good idea to turn off XML
>internally. (Raise error when attempted to use)
>
>I plan to test this part and provide comments along with a few other items.
>
>Satheesh
>
>
>
>>+1 on getting this initial XML support into Derby. Even though the patch
>>has already in, I will try to review the new version sometime.
>>At some point the testing does need to be part of the regular derby
>>suite though I think the current approach is good. I need to understand
>>the dependency on xerces, and if the default XML parser supplied by the
>>VM can be used instead.
>>
>>This is probably a good example of open source, get some initial working
>>functionality (incremental development) and then see if it can be
>>improved by others.
>>
>>Dan.
>>
>>
>>
>>
>>
>>
>>
>
>
>
Re: [jira] Updated: (DERBY-334) Add initial SQL support for XML datatype/functions
in Derby, based on SQL/XML specs.
Posted by Satheesh Bandaram <sa...@Sourcery.Org>.
On the similar lines, I also think the XML support should turn itself
OFF gracefully in environments that don't support XML. I think the patch
requires JDK 1.4 or higher, so unless Derby has plans to end_of_line JDK
1.3 (not sure if there is a plan), it may be a good idea to turn off XML
internally. (Raise error when attempted to use)
I plan to test this part and provide comments along with a few other items.
Satheesh
>+1 on getting this initial XML support into Derby. Even though the patch
>has already in, I will try to review the new version sometime.
>At some point the testing does need to be part of the regular derby
>suite though I think the current approach is good. I need to understand
>the dependency on xerces, and if the default XML parser supplied by the
>VM can be used instead.
>
>This is probably a good example of open source, get some initial working
>functionality (incremental development) and then see if it can be
>improved by others.
>
>Dan.
>
>
>
>
>
Re: [jira] Updated: (DERBY-334) Add initial SQL support for XML datatype/functions
in Derby, based on SQL/XML specs.
Posted by Daniel John Debrunner <dj...@debrunners.com>.
A B (JIRA) wrote:
> [ http://issues.apache.org/jira/browse/DERBY-334?page=all ]
>
> A B updated DERBY-334:
> ----------------------
>
> Attachment: derby-xml_v4.stat
> derby-xml_v4.patch
>
> Latest patch (_v4) resolves conflicts with recent checkins. This patch also removes the two new XML tests from the derbyall suite, since we don't want to require that people running derbyall have Xerces in their classpaths. The two tests can still be run manually using RunTest. At some point we'll probably want to create a new XML suite that contains all of the XML tests, but I think that can be submitted as a seperate patch.
>
>
>>Add initial SQL support for XML datatype/functions in Derby, based on SQL/XML specs.
>>-------------------------------------------------------------------------------------
+1 on getting this initial XML support into Derby. Even though the patch
has already in, I will try to review the new version sometime.
At some point the testing does need to be part of the regular derby
suite though I think the current approach is good. I need to understand
the dependency on xerces, and if the default XML parser supplied by the
VM can be used instead.
This is probably a good example of open source, get some initial working
functionality (incremental development) and then see if it can be
improved by others.
Dan.
[jira] Updated: (DERBY-334) Add initial SQL support for XML datatype/functions in Derby, based on SQL/XML specs.
Posted by "A B (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-334?page=all ]
A B updated DERBY-334:
----------------------
Attachment: derby-xml_v4.stat
derby-xml_v4.patch
Latest patch (_v4) resolves conflicts with recent checkins. This patch also removes the two new XML tests from the derbyall suite, since we don't want to require that people running derbyall have Xerces in their classpaths. The two tests can still be run manually using RunTest. At some point we'll probably want to create a new XML suite that contains all of the XML tests, but I think that can be submitted as a seperate patch.
> Add initial SQL support for XML datatype/functions in Derby, based on SQL/XML specs.
> -------------------------------------------------------------------------------------
>
> Key: DERBY-334
> URL: http://issues.apache.org/jira/browse/DERBY-334
> Project: Derby
> Type: New Feature
> Components: SQL
> Versions: 10.1.0.0
> Reporter: A B
> Assignee: A B
> Fix For: 10.1.0.0
> Attachments: derby-xml_v4.patch, derby-xml_v4.stat
>
> Adding some "starter" XML functionality to Derby, which can then serve as the basis for future XML development. Initial features include the following:
> 1 - A built-in XML datatype.
> 2 - An XMLPARSE() operator for creating XML values.
> 3 - An XMLSERIALIZE() operator for serializing XML values to strings (for data retrieval).
> 4 - An XMLEXISTSTS() operator for running simple existence queries against XML using XPath.
> These features are implemented at the SQL level only (no JDBC support). See the email here for a more detailed description:
> http://thread.gmane.org/gmane.comp.apache.db.derby.devel/4468
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Closed: (DERBY-334) Add initial SQL support for XML
datatype/functions in Derby, based on SQL/XML specs.
Posted by "A B (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-334?page=all ]
A B closed DERBY-334:
---------------------
All changes described have been in the codeline for over a year now. Additional changes to be completed for 10.2 are described in DERBY-688, so closing this issue.
> Add initial SQL support for XML datatype/functions in Derby, based on SQL/XML specs.
> -------------------------------------------------------------------------------------
>
> Key: DERBY-334
> URL: http://issues.apache.org/jira/browse/DERBY-334
> Project: Derby
> Type: New Feature
> Components: SQL
> Versions: 10.1.1.0
> Reporter: A B
> Assignee: A B
> Fix For: 10.1.1.0
> Attachments: derby-xml_v4.patch, derby-xml_v4.stat
>
> Adding some "starter" XML functionality to Derby, which can then serve as the basis for future XML development. Initial features include the following:
> 1 - A built-in XML datatype.
> 2 - An XMLPARSE() operator for creating XML values.
> 3 - An XMLSERIALIZE() operator for serializing XML values to strings (for data retrieval).
> 4 - An XMLEXISTSTS() operator for running simple existence queries against XML using XPath.
> These features are implemented at the SQL level only (no JDBC support). See the email here for a more detailed description:
> http://thread.gmane.org/gmane.comp.apache.db.derby.devel/4468
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
Re: [jira] Commented: (DERBY-334) Add initial SQL support for XML
datatype/functions in Derby, based on SQL/XML specs.
Posted by Daniel John Debrunner <dj...@debrunners.com>.
Army wrote:
> Satheesh Bandaram wrote:
>
>> I think that part of the code needs to be changed too. You seem to be
>> using DataDictionary just to set 'defaultImplId', which you might be
>> able to do it outside of datatype layer?
>
>
> It might be possible, but I'm not sure how. The reason I use
> DataDictionary to get the default impl id is because the default impl id
> depends on the version of the _on-disk_ database, and that information
> is only available from the DataDictionary, so far as I know.
>
[snip]
The actual issue is that you don't know *now* how a different
implementation will be selected, thus putting in logic to handle that is
premature. As you say, better to let the person who adds a separate
implementation figure it out.
Dan.
Re: [jira] Commented: (DERBY-334) Add initial SQL support for XML
datatype/functions in Derby, based on SQL/XML specs.
Posted by Army <qo...@sbcglobal.net>.
Satheesh Bandaram wrote:
> I think that part of the code needs to be changed too. You seem to be
> using DataDictionary just to set 'defaultImplId', which you might be
> able to do it outside of datatype layer?
It might be possible, but I'm not sure how. The reason I use DataDictionary to
get the default impl id is because the default impl id depends on the version of
the _on-disk_ database, and that information is only available from the
DataDictionary, so far as I know.
If we hardcode the default impl id somewhere in the XML class, then that means
soft upgrade will break. For example, if a 10.2 engine starts up a 10.1
database and inserts some XML data, a hardcoded XML impl id for 10.2 will be
written to disk. Then the user backs out the softupgrade and tries to read the
data, but it sees an impl id that it (10.1) doesn't recognize, so it chokes.
The only way to make this scenario work is to set the default impl id based on
the on-disk database version. And that means using DataDictionary.
If, as Dan said, we just want to code up for a single implementation (for now),
then I can just drop this logic altogether--whoever's lucky enough to write the
next XML implementation can deal with it ;)
Otherwise, I'm certainly open to ideas on how else to get this info without
using the SQL layer...?
Army
Re: [jira] Commented: (DERBY-334) Add initial SQL support for XML
datatype/functions in Derby, based on SQL/XML specs.
Posted by Satheesh Bandaram <sa...@Sourcery.Org>.
I think that part of the code needs to be changed too. You seem to be
using DataDictionary just to set 'defaultImplId', which you might be
able to do it outside of datatype layer?
Satheesh
> Okay, I can move impl.sql.xml.* back to the iapi.types. But will that
> resolve the issue you mentioned about spilling over into the SQL
> layer? Even if I redo the packaging, the XML implementation file will
> still make the call to the DataDictionary class in
> org.apache.derby.iapi.sql.dictionary, so isn't that cross-over still
> going to be there? Does that part of the code need to change?
>
>> There is a theory of "You ain't going to need it", which really says
>> only code what you need. If we only need a single XML implementation at
>> the moment then code it that way, just allow the on-disk format to have
>> multiple implementations in the future. The api is XMLDataValue and the
>> implementation XML. Just an idea, again I think in Cloudscape we built
>> too much infrastructure for multiple implementations, where in many
>> cases one will suffice.
>
>
> I can certainly code it for a single XML implementation, but seeing
> as, in this particular case, we _expect_ that multiple implementations
> are going to exist for XML, it seems much cleaner (to me) to code up
> the structure now. When the SQLInteger type was created, what were
> the odds that it was going to require multiple implementations?
> Probably not as high as for XML--not only are we acknowledging that
> another (better) XML implementation could come up in the future, but
> we're _hoping_ for one. To put the structure in place now means that
> future contributors can focus on adding the new implementation and not
> on re-organizing the old one(s). And the easier it is to add a new,
> smarter implementation, the more likely we are to have someone
> volunteer to do it :)
>
> But that's my proverbial two cents. I can certainly re-org the code
> to just have an XMLDataValue interface and a single XML
> implementation, if that's the desired solution.
>
> SO, I guess I'll post the revised patch that I have (all tests passed
> from last night's run) for people to review, and then I'll start
> working on a third version of the patch that 1) moves impl.sql.xml
> back to types.iapi, and 2) is simplified to just worry about a single
> XML (UTF-8 based) implementation.
>
> Thanks much for the feedback!
>
> Army
>
>
>
Re: [jira] Commented: (DERBY-334) Add initial SQL support for XML
datatype/functions in Derby, based on SQL/XML specs.
Posted by Army <qo...@sbcglobal.net>.
Daniel John Debrunner wrote:
> In some ways Cloudscape split too much into api and implementation and
> the types package was attempt to fix that, there used to be an impl
> types. Looking at it, Derby will only ever need one implementation for
> INTEGER so that's why the types moved to a single package. In only rare
> cases, DECIMAL, maybe XML does Derby need separate implementations.
Okay, I can move impl.sql.xml.* back to the iapi.types. But will that resolve
the issue you mentioned about spilling over into the SQL layer? Even if I redo
the packaging, the XML implementation file will still make the call to the
DataDictionary class in org.apache.derby.iapi.sql.dictionary, so isn't that
cross-over still going to be there? Does that part of the code need to change?
> There is a theory of "You ain't going to need it", which really says
> only code what you need. If we only need a single XML implementation at
> the moment then code it that way, just allow the on-disk format to have
> multiple implementations in the future. The api is XMLDataValue and the
> implementation XML. Just an idea, again I think in Cloudscape we built
> too much infrastructure for multiple implementations, where in many
> cases one will suffice.
I can certainly code it for a single XML implementation, but seeing as, in this
particular case, we _expect_ that multiple implementations are going to exist
for XML, it seems much cleaner (to me) to code up the structure now. When the
SQLInteger type was created, what were the odds that it was going to require
multiple implementations? Probably not as high as for XML--not only are we
acknowledging that another (better) XML implementation could come up in the
future, but we're _hoping_ for one. To put the structure in place now means
that future contributors can focus on adding the new implementation and not on
re-organizing the old one(s). And the easier it is to add a new, smarter
implementation, the more likely we are to have someone volunteer to do it :)
But that's my proverbial two cents. I can certainly re-org the code to just
have an XMLDataValue interface and a single XML implementation, if that's the
desired solution.
SO, I guess I'll post the revised patch that I have (all tests passed from last
night's run) for people to review, and then I'll start working on a third
version of the patch that 1) moves impl.sql.xml back to types.iapi, and 2) is
simplified to just worry about a single XML (UTF-8 based) implementation.
Thanks much for the feedback!
Army
Re: [jira] Commented: (DERBY-334) Add initial SQL support for XML
datatype/functions in Derby, based on SQL/XML specs.
Posted by Daniel John Debrunner <dj...@debrunners.com>.
Army wrote:
> Daniel John Debrunner (JIRA) wrote:
>
>> [
>> http://issues.apache.org/jira/browse/DERBY-334?page=comments#action_12312598
>> ]
>> Daniel John Debrunner commented on DERBY-334:
>> ---------------------------------------------
>>
>> From a quick look at the initial patch it seems the XML data type
>> spills over into the SQL layer, through use of classes in the new
>> package impl.sql.xml.
>
>
> [ snip ]
>
>> It may be that you just created a sql.xml package instead of puting
>> the classes in the iapi.types package, but I did see a reference to
>> the DataDictionary in one of the classes in impl.sql.xml.
>
>
> At first I had indeed put the XML implementation classes (the ones in
> sql.xml) into the iapi.types package--and that worked just fine (I just
> imported the DataDictionary into the iapi.types package, which didn't
> show any problems).
>
> When I started the code "re-org" though, I decided to move the classes
> to impl.sql.xml because 1) the package name seemed to make more sense to
> me ("sql.xml" => SQL/XML, and "impl" => these are the implementation
> classes, not the interface/type classes); and 2) I don't know how many
> more XML type implementations we're going to have in the future, but it
> seemed like it would be cleaner to have all of them isolated into their
> own package, instead of cluttering the iapi.types package with
> who-knows-how-many XML impl files.
The current types are SQL types, e.g. SQLInteger, but they live in the
types directory. Thus the correct place for a SQL XML type is the api
directory. The {iapi/impl}/sql packages are for the SQL compilation and
execution engine.
In some ways Cloudscape split too much into api and implementation and
the types package was attempt to fix that, there used to be an impl
types. Looking at it, Derby will only ever need one implementation for
INTEGER so that's why the types moved to a single package. In only rare
cases, DECIMAL, maybe XML does Derby need separate implementations.
> That said, moving impl.sql.xml back to iapi.types is certainly doable,
> but I'm not sure if that would handle the issue you bring up--by using
> DataDictionary in the XML impl class, we're still crossing the two
> layers...So maybe that's the more fundamental issue...
>
>> I'm not sure if we need the double indirection,
>> XMLDataValue->XML->implementation.
>
>
> I've gone over that question a couple of times, too. I've re-organized
> the XML type classes several times since I first began, so maybe this
> double indirection is a result of an old class organization. I'll try
> to look at it again to see if I can explain why I did it...
There is a theory of "You ain't going to need it", which really says
only code what you need. If we only need a single XML implementation at
the moment then code it that way, just allow the on-disk format to have
multiple implementations in the future. The api is XMLDataValue and the
implementation XML. Just an idea, again I think in Cloudscape we built
too much infrastructure for multiple implementations, where in many
cases one will suffice.
Dan.
Re: [jira] Commented: (DERBY-334) Add initial SQL support for XML
datatype/functions in Derby, based on SQL/XML specs.
Posted by Army <qo...@sbcglobal.net>.
Daniel John Debrunner (JIRA) wrote:
> [ http://issues.apache.org/jira/browse/DERBY-334?page=comments#action_12312598 ]
>
> Daniel John Debrunner commented on DERBY-334:
> ---------------------------------------------
>
> From a quick look at the initial patch it seems the XML data type
> spills over into the SQL layer, through use of classes in the new
> package impl.sql.xml.
[ snip ]
> It may be that you just created a sql.xml package instead of
> puting the classes in the iapi.types package, but I did see a
> reference to the DataDictionary in one of the classes in
> impl.sql.xml.
At first I had indeed put the XML implementation classes (the ones in sql.xml)
into the iapi.types package--and that worked just fine (I just imported the
DataDictionary into the iapi.types package, which didn't show any problems).
When I started the code "re-org" though, I decided to move the classes to
impl.sql.xml because 1) the package name seemed to make more sense to me
("sql.xml" => SQL/XML, and "impl" => these are the implementation classes, not
the interface/type classes); and 2) I don't know how many more XML type
implementations we're going to have in the future, but it seemed like it would
be cleaner to have all of them isolated into their own package, instead of
cluttering the iapi.types package with who-knows-how-many XML impl files.
That said, moving impl.sql.xml back to iapi.types is certainly doable, but I'm
not sure if that would handle the issue you bring up--by using DataDictionary in
the XML impl class, we're still crossing the two layers...So maybe that's the
more fundamental issue...
> I'm not sure if we need the double indirection, XMLDataValue->XML->implementation.
I've gone over that question a couple of times, too. I've re-organized the XML
type classes several times since I first began, so maybe this double indirection
is a result of an old class organization. I'll try to look at it again to see
if I can explain why I did it...
> Once the new patch is posted I will look at the data type closely,
As for the next patch: I'm done making code changes to address Satheesh's
comments (aside from aesthetics), but I still need to run "derbyall". That
means I won't be able to post the new patch until 8 hours after I start the
test, which means sometime in the middle of the night or (more likely) tomorrow
morning...(sorry, but posting the patch without running derbyall is a bit too
risky, since my changes weren't just to the new XML files).
Army
[jira] Commented: (DERBY-334) Add initial SQL support for XML datatype/functions in Derby, based on SQL/XML specs.
Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-334?page=comments#action_12312598 ]
Daniel John Debrunner commented on DERBY-334:
---------------------------------------------
>From a quick look at the initial patch it seems the XML data type spills over into the SQL layer, through use of classes in the new package impl.sql.xml. This might be a problem, the type system is meant to be indpendent of the SQL layer, the types can be used during recovery before the SQL system has booted.
It may be that you just created a sql.xml package instead of puting the classes in the iapi.types package, but I did see a reference to the DataDictionary in one of the classes in impl.sql.xml.
Once the new patch is posted I will look at the data type closely, I'm not sure if we need the double indirection, XMLDataValue->XML->implementation.
> Add initial SQL support for XML datatype/functions in Derby, based on SQL/XML specs.
> -------------------------------------------------------------------------------------
>
> Key: DERBY-334
> URL: http://issues.apache.org/jira/browse/DERBY-334
> Project: Derby
> Type: New Feature
> Components: SQL
> Versions: 10.1.0.0
> Reporter: A B
> Assignee: A B
> Fix For: 10.1.0.0
> Attachments: derby-xml.patch, derby-xml.stat
>
> Adding some "starter" XML functionality to Derby, which can then serve as the basis for future XML development. Initial features include the following:
> 1 - A built-in XML datatype.
> 2 - An XMLPARSE() operator for creating XML values.
> 3 - An XMLSERIALIZE() operator for serializing XML values to strings (for data retrieval).
> 4 - An XMLEXISTSTS() operator for running simple existence queries against XML using XPath.
> These features are implemented at the SQL level only (no JDBC support). See the email here for a more detailed description:
> http://thread.gmane.org/gmane.comp.apache.db.derby.devel/4468
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (DERBY-334) Add initial SQL support for XML datatype/functions in Derby, based on SQL/XML specs.
Posted by "A B (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-334?page=all ]
A B updated DERBY-334:
----------------------
Attachment: derby-xml_v3.stat
derby-xml_v3.patch
Attaching version 3 of the XML patch, based on Dan Debrunner's comments. Notable differences between this version and the previous version are as follows:
1 - Combined "XMLImpl", "XML_UTF8Impl" and "XML" into a single class, XML.java. This class implements the XMLDataValue interface using a UTF-8 based representation of XML. The class writes an "implementation id" to disk whenever writing an XML value, but does NOT have any other infrastructure for adding future implementations. When smarter implementations of the XML datatype are written, the implementation id written to disk will be the thing that allows differentiation between the current UTF-8 impl and whatever the future implementation(s) is/are. But in terms of infrastructure for the new implementations, that will have to be handled whenever the next XML impl is written.
2 - In order to get #1 to build successfully, I had to swap the build order for "iapi/types" and "iapi/services" in the iapi/build.xml file. This seems to have worked without a problem, but I thought I'd mention it in case there's some side effect here that I don't know about (esp. w.r.t to build jars). Anyone know?
3 - In previous versions of the patch, I imported StoredFormatIds in several classes and then did a check to see if a TypeId's format matched StoredFormatIds.XML_TYPE_ID. This time around it occurred to me that I should just be calling TypeId.isXMLTypeId() instead, which is much cleaner. So I made that change where appropriate.
4 - I added the "svn:eol" property on all of the new files, which I hadn't done in my previous patches.
Comments are appreciated,
Army
> Add initial SQL support for XML datatype/functions in Derby, based on SQL/XML specs.
> -------------------------------------------------------------------------------------
>
> Key: DERBY-334
> URL: http://issues.apache.org/jira/browse/DERBY-334
> Project: Derby
> Type: New Feature
> Components: SQL
> Versions: 10.1.0.0
> Reporter: A B
> Assignee: A B
> Fix For: 10.1.0.0
> Attachments: derby-xml_v2.stat, derby-xml_v3.patch, derby-xml_v3.stat
>
> Adding some "starter" XML functionality to Derby, which can then serve as the basis for future XML development. Initial features include the following:
> 1 - A built-in XML datatype.
> 2 - An XMLPARSE() operator for creating XML values.
> 3 - An XMLSERIALIZE() operator for serializing XML values to strings (for data retrieval).
> 4 - An XMLEXISTSTS() operator for running simple existence queries against XML using XPath.
> These features are implemented at the SQL level only (no JDBC support). See the email here for a more detailed description:
> http://thread.gmane.org/gmane.comp.apache.db.derby.devel/4468
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (DERBY-334) Add initial SQL support for XML datatype/functions in Derby, based on SQL/XML specs.
Posted by "A B (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-334?page=all ]
A B updated DERBY-334:
----------------------
Version: 10.1.0.0
> Add initial SQL support for XML datatype/functions in Derby, based on SQL/XML specs.
> -------------------------------------------------------------------------------------
>
> Key: DERBY-334
> URL: http://issues.apache.org/jira/browse/DERBY-334
> Project: Derby
> Type: New Feature
> Components: SQL
> Versions: 10.1.0.0
> Reporter: A B
> Assignee: A B
> Fix For: 10.1.0.0
>
> Adding some "starter" XML functionality to Derby, which can then serve as the basis for future XML development. Initial features include the following:
> 1 - A built-in XML datatype.
> 2 - An XMLPARSE() operator for creating XML values.
> 3 - An XMLSERIALIZE() operator for serializing XML values to strings (for data retrieval).
> 4 - An XMLEXISTSTS() operator for running simple existence queries against XML using XPath.
> These features are implemented at the SQL level only (no JDBC support). See the email here for a more detailed description:
> http://thread.gmane.org/gmane.comp.apache.db.derby.devel/4468
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
Re: [jira] Updated: (DERBY-334) Add initial SQL support for XML datatype/functions
in Derby, based on SQL/XML specs.
Posted by Army <qo...@sbcglobal.net>.
Satheesh Bandaram wrote:
> I couldn't apply the latest XML patch... Lots of changes have happened in
> SQLgrammar.jj file since this was submitted. Also some differences in two other
> files. Can you please submit an updated patch?
Okay, will do.
> I will work on getting that committed soon.
Does this new XML feature require a VOTE before commit?
Army
[jira] Updated: (DERBY-334) Add initial SQL support for XML datatype/functions in Derby, based on SQL/XML specs.
Posted by "A B (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-334?page=all ]
A B updated DERBY-334:
----------------------
Attachment: derby-xml_v2.stat
derby-xml_v2.patch
Attaching second version of the patch to address the issues brought up by Satheesh. In particular:
1 - Simplified logic to check for XML values in a top-level SELECT/VALUES statement. New logic is similar to the existing logic for rejecting parameter markers in the same situation.
2 - Consolidated the XMLParseOperatorNode and XMLSerializeOperatorNode classes into UnaryOperatorNode; also consolidated the XMLExistsOperatorNode class into BinaryOperatorNode.
3 - Added example of how to query using namespaces to the XML impl class, and added test cases to the lang/xml_general.sql test.
4 - Removed the assumption that the only valid type of an XML "constant" is a null value. Satheesh said that this assumption was false, though I couldn't come up with an example to test it. If anyone knows of such an example, please post...
5 - Fixed XML binding so that the correct behavior occurs in both embedded and Network Server modes. In the first version of the patch, attempts to bind to an XML column over the server weren't properly caught and the result was a protocol exception with connection deallocation. This version of the patch fixes that problem.
I am now going to begin a third version of the patch to address Dan Debrunner's comments as found here:
http://article.gmane.org/gmane.comp.apache.db.derby.devel/4987
In the meantime, any feedback re: this current (second) version is appreciated.
> Add initial SQL support for XML datatype/functions in Derby, based on SQL/XML specs.
> -------------------------------------------------------------------------------------
>
> Key: DERBY-334
> URL: http://issues.apache.org/jira/browse/DERBY-334
> Project: Derby
> Type: New Feature
> Components: SQL
> Versions: 10.1.0.0
> Reporter: A B
> Assignee: A B
> Fix For: 10.1.0.0
> Attachments: derby-xml_v2.patch, derby-xml_v2.stat
>
> Adding some "starter" XML functionality to Derby, which can then serve as the basis for future XML development. Initial features include the following:
> 1 - A built-in XML datatype.
> 2 - An XMLPARSE() operator for creating XML values.
> 3 - An XMLSERIALIZE() operator for serializing XML values to strings (for data retrieval).
> 4 - An XMLEXISTSTS() operator for running simple existence queries against XML using XPath.
> These features are implemented at the SQL level only (no JDBC support). See the email here for a more detailed description:
> http://thread.gmane.org/gmane.comp.apache.db.derby.devel/4468
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira