Bug #6404
conversion for dataset-handle and table-handle parameters with table fields or class properties
100%
Related issues
History
#2 Updated by Constantin Asofiei about 4 years ago
- Assignee changed from Constantin Asofiei to Ovidiu Maxiniuc
Ovidiu, in testcases/uast/dsh_th_args there are tests which show how a table field or class property can work as an argument for TABLE-HANDLE and DATASET-HANDLE . I think I've covered all cases, but there are still some issues.
For example , there is no TableParameter emitted at all for fields and class properties (I assume for vars is emitted, didn't test). This and another issue related to DYNAMIC-NEW I think are what's left.
The current patch is pretty simple, I just fixed set_handle_stmts in common-progress.rules:
### Eclipse Workspace Patch 1.0
#P p2j6129a
Index: rules/include/common-progress.rules
===================================================================
--- rules/include/common-progress.rules (revision 3611)
+++ rules/include/common-progress.rules (working copy)
@@ -3586,6 +3586,23 @@
target.upPath("STATEMENT/CREATE_WIDGET")
<action>match = true</action>
</rule>
+
+ <rule>target.parent.type == prog.kw_dset_hnd or target.parent.type == prog.kw_tab_hand
+ <rule>target.upPath("KW_RUN/LPARENS/PARAMETER/EXPRESSION/KW_DSET_HND") or
+ target.upPath("KW_RUN/LPARENS/PARAMETER/EXPRESSION/KW_TAB_HAND")
+ <!-- check to be an OUTPUT or INPUT-OUTPUT parameter -->
+ <action>
+ match = target.parent.parent.parent.downPath("KW_OUTPUT") or
+ target.parent.parent.parent.downPath("KW_IN_OUT")
+ </action>
+ </rule>
+
+ <rule>evalLib("call_to_user_defined_function", target.parent.parent) or
+ evalLib("oo_call_type", target.parent.parent, target.parent)
+ <!-- check to be an OUTPUT or INPUT-OUTPUT parameter -->
+ <action>match = not evalLib("input_argument", target.parent)</action>
+ </rule>
+ </rule>
</function>
<function name="set_field_comhandle_stmts">
If you can fix it tonight, do let me know. Otherwise, I'll pick it up in the morning.
#3 Updated by Ovidiu Maxiniuc about 4 years ago
Sorry, no, I could not come up with a better solution for this issue.
#4 Updated by Constantin Asofiei about 4 years ago
- Assignee changed from Ovidiu Maxiniuc to Constantin Asofiei
#5 Updated by Constantin Asofiei about 4 years ago
- % Done changed from 0 to 100
- Status changed from WIP to Review
Fixed in 6129a/13880
Ovidiu, please review.
#6 Updated by Greg Shah about 4 years ago
Unfortunately, we are duplicating effort here. I've already resolved this in #4350 but need time to fix the issues before it can be integrated into 6129a.
#7 Updated by Ovidiu Maxiniuc about 4 years ago
I have reviewed the changes in 13880 and they look OK to me.
Does this completely overlap with #4350 patches?
#8 Updated by Greg Shah about 4 years ago
Yes, I think so. I did it slightly differently because I introduced specific subclasses to handle the combinations of mode + type:
src/com/goldencode/p2j/persist/InputDataSetHandle.java src/com/goldencode/p2j/persist/InputDataSetParameter.java src/com/goldencode/p2j/persist/InputOutputDataSetHandle.java src/com/goldencode/p2j/persist/InputOutputDataSetParameter.java src/com/goldencode/p2j/persist/OutputDataSetHandle.java src/com/goldencode/p2j/persist/OutputDataSetParameter.java src/com/goldencode/p2j/util/InputOutputTableHandle.java src/com/goldencode/p2j/util/InputOutputTableParameter.java src/com/goldencode/p2j/util/InputTableHandle.java src/com/goldencode/p2j/util/InputTableParameter.java src/com/goldencode/p2j/util/OutputTableHandle.java src/com/goldencode/p2j/util/OutputTableParameter.java
This allows us to overload signatures by mode and even separate out the different handle types.
#9 Updated by Constantin Asofiei about 4 years ago
Ovidiu, maybe you recall better - but wasn't it possible to pass table-handle to table parameter and table to table-handle?
#10 Updated by Greg Shah about 4 years ago
Constantin Asofiei wrote:
Ovidiu, maybe you recall better - but wasn't it possible to pass table-handle to table parameter and table to table-handle?
That is taken care of by having different constructors for these classes.
#11 Updated by Constantin Asofiei about 4 years ago
- Related to Feature #4350: method overload when they differ by a temp-table, dataset, buffer or object or extent or parameter modes added
#12 Updated by Constantin Asofiei about 4 years ago
- Status changed from Review to Test