Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 176396 - Support for object references in result sets
Summary: Support for object references in result sets
Status: RESOLVED FIXED
Alias: None
Product: Data Tools
Classification: Tools
Component: Open Data Access (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 1.7M6   Edit
Assignee: Linda Chan CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 178897
  Show dependency tree
 
Reported: 2007-03-05 12:46 EST by Mike Boyersmith CLA
Modified: 2009-03-05 23:45 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Boyersmith CLA 2007-03-05 12:46:24 EST
Current ODA driver development support as far as I know and from talking with others does not support a column type that is of type java 'Object reference'. 

I would like to create an ODA driver where the column 'Type' might be a live Object Reference. This would be useful in "join" situations where I want to compare objects for equality in order to get a result table of interest.  The benefit from a performance standpoint would be that this is super efficient compared to doing string compares especially in the case of any URI string comparisons.
Comment 1 Linda Chan CLA 2007-03-08 15:44:31 EST
Mike,

I'd like to get a better understanding of your use case.
By having an 'Object reference' type for a result set column, how do you foresee a consumer application, such as BIRT, consumes such column data?
Your description refers to "compare objects for equality in order to get a result table of interest", will it be the ODA driver or its consumer that would do such comparison operation?  
It would be helpful to provide more specifics on the usage scenario.

Linda
Comment 2 Mike Boyersmith CLA 2007-03-12 12:42:38 EDT
Hi Linda,

Ideally the ODA driver should be able to return a result set that contains column object references.  It may also be nice to have object ‘type’ supported as well. From this returned result set that has columns with object references, there are a couple of ways it could be used and consumed. 

During a ‘Join’ operation, two result sets that are being joined based off of object reference columns could do equality comparison to get the join table. 

Also, in the other case of doing a join where one result set column is  made of object references and the other result set column is made of say type String, then perhaps the Object references ‘toString()’ method would be called and the join comparison accomplished that way. 

Finally, a result set either via join operation, or by general result set construction that ends up with columns that contains object references, could then be consumed by calling the ‘toString()’ method on the object to get to a scalar type. Or perhaps the ODA driver could specify how to consume the type at consume time.

In regards to “compare objects for equality in order to get a
result table of interest", I’m referring directly to the “Join” facility that BIRT uses, I’m not sure if DTP owns this or BIRT. 

Hope this helps to identify possibly requirements, or helps with us talking about this sort of support
Comment 3 Linda Chan CLA 2007-03-14 16:25:35 EDT
Mike,

From your description, it seems the main purpose of using an object reference is for potentially better performance in equality comparison during a join operation.
The join operation you described is handled within the BIRT Data Engine.  Besides during equality comparion on a column, BIRT Data Engine would also need to be able to do sorting on a column.  What this means is that to support this, we will probably need to define a new interface for an object reference type, with all the methods that a consumer application might need, such as equals, compareTo, etc.  
We will no doubt need to put more thoughts into this first.  Besides, from BIRT Data Engine perspective, it has quite a few other areas that it can make a bigger impact in performance improvement, than in comparing 2 objects during a join operation.  This feature is thus not likely to make it in BIRT 2.2.  

Can you please submit another Bugzilla entry for the improvement you want to see in BIRT's Join operation? This would enable us to plan for these 2 enhancements within the same Eclipse train.

BTW, the consumption of such an object ref column in a BIRT report item can be achieved now by mapping it to an ODA scalar data type, e.g. String.  This would trigger the call to getString on the column, which would then be up to the ODA driver implementation to convert the actual object to a String value.
Comment 4 Mike Boyersmith CLA 2007-03-22 17:16:31 EDT
I have filed a 'join' support with BIRT at

https://bugs.eclipse.org/bugs/show_bug.cgi?id=178897


But, had additional question here. Doesn't the ODA driver base architecture at this moment only support scalar types in columns? so wouldn't the DTP project also need to do some work here to support object references so I can have a table that might have columns like

[String], [int], [Object]

Thanks for any clarifications



Comment 5 Linda Chan CLA 2007-03-23 19:01:53 EDT
Yes, this enhancement would involve adding support of object reference in DTP ODA interfaces.
Comment 6 Linda Chan CLA 2009-03-05 16:26:48 EST
The Java Object data type is added as a new ODA scalar data type. The new data type is supported in an ODA result set column, plus in an ODA parameter for both input/output and scalar/complex types. 
The ODA framework does not require a driver implementation to provide a wrapper for such Java objects. It is up to the implementation of an ODA consumer and runtime driver to consume the object type. An ODA consumer application may impose own additional restriction on the type of Object that it can consume. For example, in order for a consumer application to sort the values of a result set column, the Object data type in an ODA result set column must implement the java.lang.Comparable interface. 

See the API Changes section described in 
http://wiki.eclipse.org/Galileo_DTP_ODA_API_Changes_Spec .
Comment 7 Linda Chan CLA 2009-03-05 23:45:57 EST
Committed in CVS the ODA framework enhancement described in Comment #6.