Claims
- 1. A method of processing a multi-state attribute field query, comprising:
instantiating a plurality of live objects; performing, by each live object, an attribute operation, wherein at least one attribute operation is a comparison operation associated with attributes of the query; performing the comparison operation by de-referencing associated attribute operands and loading the attribute operands into registers without an intermediate step of placing the operands into a structure for further manipulation; accessing, by any of the plurality of live objects, a global status storage area only when an operand of the comparison operation is null or error; and passing, from each live object, execution control of the respective attribute operation to an adjacent live object.
- 2. The method of claim 1, wherein execution control passes using call foliation.
- 3. The method of claim 1, wherein each comparison operation comprises a logic value and sub-tree height count allowing a previous comparison operation of the query to track a number of statuses in the global status storage area to be evaluated.
- 4. The method of claim 1, further comprising, in the event an attribute operand of the comparison operation is null or error, passing execution control to an adjacent live object via one of a TRUE branch and a FALSE branch.
- 5. The method of claim 1, wherein accessing the global status storage area comprises placing a Boolean logic operator value in the global status storage area.
- 6. The method of claim 1, wherein accessing the global status storage area comprises placing a status value and a behavior value in the global status storage area.
- 7. The method of claim 1, wherein the global status storage area is a status stack for storing status information of comparison operations.
- 8. The method of claim 1, wherein the global status storage area preserves an order in which statuses are stored to the global status storage area.
- 9. The method of claim 1, further comprising: if the comparison operation includes invalid state attribute operands, using non-outcome determinative input-output logic operator properties to structure execution flow circumventing unproductive branches and yielding intermediate results from a group of true and false; whereby invalid intermediate results are pruned out rendering them ineffective in producing query results.
- 10. The method of claim 1, wherein the query is a structure query language (SQL) query.
- 11. The method of claim 1, wherein the comparison operation is one of a pair of comparison operations of a Boolean AND logic operator and if any operands of the comparison operation is an error or null, then driving execution flow to an adjacent object via a true branch in order to promote a FALSE state mapping.
- 12. The method of claim 1, wherein the comparison operation is one of a pair of comparison operations of a Boolean OR logic operator and if any operands of the comparison operation is an error or null, then driving execution flow to an adjacent object via a false branch in order to promote a TRUE state mapping.
- 13. A method of processing a multi-state attribute field query, comprising:
instantiating a plurality of live objects; performing, by at least a portion of the live objects, comparison operations comprising operands associated with attributes of the query; wherein each comparison operation is performed by de-referencing associated attribute operands and loading the associated attribute operands into registers without an intermediate step of placing the operands into an intermediate structure for further manipulation; and if the comparison operation operands are valid, passing execution control from each live object to an adjacent live object, via a TRUE or FALSE, without accessing a stack.
- 14. The method of claim 14, accessing, by the portion of live objects, the stack only if the associated attribute operands are null or error.
- 15. The method of claim 14, further comprising, if at least one of the associated attribute operands is invalid, using non-outcome determinative input-output logic operator properties to structure execution flow circumventing unproductive branches and yielding intermediate results from a group of true and false; whereby null and error intermediate results are pruned out rendering them ineffective in producing query results.
- 16. The method of claim 14, wherein each comparison operation comprises a logic value and sub-tree height count allowing a previous comparison operation of the query to track a number of statuses in a global status storage area to be evaluated.
- 17. The method of claim 14, wherein if a comparison operation is one of a pair of comparison operations of a Boolean AND logic operator and if any operands of the comparison operation is an error or null, then driving execution flow to an adjacent object via a true branch in order to promote a FALSE state mapping.
- 18. The method of claim 14, further comprising, wherein if a comparison operation is one of a pair of comparison operations of a Boolean OR logic operator and if any operands of the comparison operation is an error or null, then driving execution flow to an adjacent object via a false branch in order to promote a TRUE state mapping.
- 19. The method of claim 14, wherein the global status storage area preserves an order in which statuses are stored to the global status storage area.
- 20. A method of processing a multi-state attribute field query, comprising:
a) structuring operator result states from a group comprising true, false, null, and error as intermediate multi-state operator input state results; and b) using non-outcome determinative input-output logic operator properties to structure execution flow circumventing unproductive branches and yielding intermediate results from the group of true and false; whereby the null and error intermediate multi-state operator results on the non-outcome determinative logic operator branches are pruned out rendering them ineffective in producing query results.
- 21. The method of claim 20, further comprising executing a plurality of instruction objects configured to perform attribute operations on associated attribute operands without the use of an intermediate evaluation stack by de-referencing and loading the associated attribute operands into registers for comparison operations.
- 22. The method of claim 20, further comprising allocating fields required by the query for a characteristic of an attribute and containing reference to a corresponding field attribute value.
- 23. The method of claim 20, further comprising instantiating an attribute descriptor vector data structure which comprises a set of individual attribute descriptor vectors required for the query.
- 24. The method of claim 23, further comprising instantiating a plurality of attribute operations on attribute fields defined by the attribute descriptor vector data structure.
- 25. The method of claim 20, further comprising accessing intermediate attribute operations on corresponding attributes by call foliation.
- 26. The method of claim 20, wherein the query is a structure query language (SQL) query.
- 27. The method of claim 20, further comprising accessing a global status stack only after a null or error status is encountered, the global status stack comprising:
a status field configured to hold values selected from a group comprising true, false, null and error; and a behavior field configured to hold a logic operator.
- 28. The method of claim 20, further comprising storing the intermediate results from attribute operations in a global status storage area and manipulating the global status storage area in the process of propagating execution flow.
- 29. The method of claim 28, further comprising maintaining a logic operator value and operation object sub-tree height count in the global status storage area accessible by adjacent comparison operation objects when an operand of a comparison operation is null or error.
- 30. A computer readable medium containing a program which, when executed, performs an operation for processing a multi-state attribute field query, the operation comprising:
instantiating a plurality of live objects; performing, by each live object, an attribute operation, wherein at least one attribute operation is a comparison operation associated with attributes of the query; performing the comparison operation by de-referencing associated attribute operands and loading the attribute operands into registers without an intermediate step of placing the operands into a structure for further manipulation; accessing, by any of the plurality of live objects, a global status storage area when an operand of the comparison operation is null or error; and passing, from each live object, execution control of the respective attribute operation to an adjacent live object.
- 31. The computer-readable medium of claim 30, wherein execution control passes using call foliation.
- 32. The computer-readable medium of claim 30, wherein each comparison operation comprises a logic value and sub-tree height count allowing a previous comparison operation of the query to track a number of statuses in the global status storage area to be evaluated.
- 33. The computer-readable medium of claim 30, further comprising, in the event an attribute operand of the comparison operation is null or error, passing execution control to an adjacent live object via one of a TRUE branch and a FALSE branch.
- 34. The computer-readable medium of claim 30, wherein accessing the global status storage area comprises placing a Boolean logic operator value in the global status storage area.
- 35. The computer-readable medium of claim 30, wherein accessing the global status storage area comprises placing a status value and a behavior value in the global status storage area.
- 36. The computer-readable medium of claim 30, wherein the global status storage area is a status stack for storing status information of comparison operations.
- 37. The computer-readable medium of claim 30, wherein the global status storage area preserves an order in which statuses are stored to the global status storage area.
- 38. The computer-readable medium of claim 30, further comprising: if the comparison operation includes invalid state attribute operands, using non-outcome determinative input-output logic operator properties to structure execution flow circumventing unproductive branches and yielding intermediate results from a group of true and false; whereby invalid intermediate results are pruned out rendering them ineffective in producing query results.
- 39. The computer-readable medium of claim 30, wherein the query is a structure query language (SQL) query.
- 40. The computer-readable medium of claim 30, wherein the comparison operation is one of a pair of comparison operations of a Boolean AND logic operator and if any operands of the comparison operation is an error or null, then driving execution flow to an adjacent object via a true branch in order to promote a FALSE state mapping.
- 41. The computer-readable medium of claim 30, wherein the comparison operation is one of a pair of comparison operations of a Boolean OR logic operator and if any operands of the comparison operation is an error or null, then driving execution flow to an adjacent object via a false branch in order to promote a TRUE state mapping.
- 42. A computer readable medium containing a program which, when executed, performs an operation for processing a multi-state attribute field query, the operation comprising:
a) structuring operator result states from a group comprising true, false, null, and error as intermediate multi-state operator input state results; and b) using non-outcome determinative input-output logic operator properties to structure execution flow circumventing unproductive branches and yielding intermediate results from the group of true and false; whereby the null and error intermediate multi-state operator results on the non-outcome determinative logic operator branches are pruned out rendering them ineffective in producing query results.
- 43. The computer-readable medium of claim 42, further comprising executing a plurality of instruction objects configured to perform attribute operations on associated attribute operands without the use of an intermediate evaluation stack by de-referencing and loading the associated attribute operands into registers for comparison operations.
- 44. The computer-readable medium of claim 42, further comprising allocating fields required by the query for a characteristic of an attribute and containing reference to a corresponding field attribute value.
- 45. The computer-readable medium of claim 42, further comprising accessing intermediate attribute operations on corresponding attributes by call foliation.
- 46. The computer-readable medium of claim 42, wherein the query is a structure query language (SQL) query.
- 47. The computer-readable medium of claim 42, further comprising accessing a global status stack data structure only after a null or error status is encountered, the global status stack comprising:
a status field configured to hold values selected from a group comprising true, false, null and error; and a behavior field configured to hold a logic operator.
- 48. The computer-readable medium of claim 42, further comprising storing the intermediate results from attribute operations in a global status storage area and manipulating the global status storage area in the process of propagating execution flow.
- 49. The computer-readable medium of claim 48, further comprising maintaining a logic operator value and operation object sub-tree height count in the global status storage area accessible by adjacent comparison operation objects when an operand of a comparison operation is null or error.
- 50. The computer-readable medium of claim 42, further comprising instantiating an attribute descriptor vector data structure which comprises a set of individual attribute descriptor vectors required for the query.
- 51. The computer-readable medium of claim 50, further comprising instantiating a plurality of attribute operations on attribute fields defined by the attribute descriptor vector data structure.
CROSS-REFERENCE TO RELATED APPLICATIONS
[0001] This application is related to U.S. Ser. No. ______, filed on even date herewith by David Glenn Carlson et al. and entitled “RUNTIME QUERY OPTIMIZATION FOR DYNAMICALLY SELECTING FROM MULTIPLE PLANS IN A QUERY BASED UPON RUNTIME-EVALUATED PERFORMANCE CRITERION” (IBM ROC920010235US1), to U.S. Ser. No. ______, filed on even date herewith by David Glenn Carlson et al. and entitled “PARALLEL DATABASE QUERY PROCESSING FOR NON-UNIFORM DATA SOURCES VIA BUFFERED ACCESS” (IBM ROC920010234US1), and U.S. Ser. No. ______, filed on even date herewith by David Glenn Carlson et al. and entitled “OBJECT-ORIENTED QUERY EXECUTION DATA STRUCTURE” (IBM ROC920020104US1).