Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with Sequence involving a Union #68

Open
laurachiticariu opened this issue Jun 22, 2022 · 2 comments
Open

Problems with Sequence involving a Union #68

laurachiticariu opened this issue Jun 22, 2022 · 2 comments
Assignees
Labels
bug Something isn't working high-priority

Comments

@laurachiticariu
Copy link
Collaborator

The issue can be reproduced with this flow:
tutorial_flow.json.txt

There are several issues.

  1. Running just Amount, or just RevenueOfDivision (the union) sometimes shows results from the previous run.
  2. Running the RevenueByDivision sequence shows an exception. I think this is again something related to attribute names.

large_sequence_defect

@laurachiticariu
Copy link
Collaborator Author

@JesusGuerrero Trying to reproduce with v 0.5.0.

I imported the flow in the description, and now get this error when running:
image

Recreating the extractor from scratch, here is the flow:
gh_68.json.txt

All nodes work fine with the exception of the final sequence RevDivAmount, which results in an exception:
image

@laurachiticariu
Copy link
Collaborator Author

laurachiticariu commented Nov 16, 2022

@JesusGuerrero The problem is due to attribute names. Attribute names do not seem to propagate correctly.

In RevOfDiv1, the attribute name is Sequence_1 (even though the Node was renamed from Sequence_1 to RevOfDiv1):

image

RevOfDiv which is a union, also has the attribute Sequence_1, as can be seen from the results:
image

Now in RevDivAmount, the pattern uses <RevByDiv1.RevByDiv1> instead of <RevByDiv1.Sequence_1>. The correct behavior would be for the generated pattern to use <RevByDiv1.Sequence_1> instead.

image

This explains the AQL compiler error.

But, even if I change the attribute name in the sequence:

(<RevOfDiv.Sequence_1>)<Token>{0,15}(<Amount.Amount>)

image

The error persists:

op-dir/biadmin_elyraNLPCanvas__Export/RevDivAmount.aql' line 17, column 9: R (RevOfDiv) has no output column called 'RevOfDiv' (columns are [Sequence_1])\nIn '/app/Seer-Core/watson_nlp_demos/demos/SystemT/java/systemt-java-api-example/op-dir/biadmin_elyraNLPCanvas__Export/RevDivAmount.aql

There seems to be a problem with the semantic of the renamed attribute - I do not see Sequence_1 in line 634:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high-priority
Projects
None yet
Development

No branches or pull requests

2 participants