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
HPCC-21492 Report an error if embed : activity has an unsupported return type #12283
Conversation
https://track.hpccsystems.com/browse/HPCC-21492 |
@ghalliday Please can you review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shamser needs more work.
Please can you also add test cases - (in ecl/regress) including where it has more than one attribute.
ecl/hql/hqlgram2.cpp
Outdated
@@ -1013,7 +1013,11 @@ IHqlExpression * HqlGram::processEmbedBody(const attribute & errpos, IHqlExpress | |||
} | |||
} | |||
else | |||
{ | |||
if (attribs && attribs->queryName()==activityAtom) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is wrong - attribs is a comma list - should be using queryAttributeInList
ecl/hql/hqlgram2.cpp
Outdated
@@ -1013,7 +1013,11 @@ IHqlExpression * HqlGram::processEmbedBody(const attribute & errpos, IHqlExpress | |||
} | |||
} | |||
else |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test condition is wrong. Embed, activity
- does not support transforms, rows
- does support actions.
5710573
to
6cb459c
Compare
Automated Smoketest: ✅ Unit tests result:
Regression test result:
HPCC Stop: OK
|
@ghalliday Please can you review (test case added) |
ecl/hql/hqlgram2.cpp
Outdated
if (type->getTypeCode()!=type_table && type->getTypeCode()!=type_groupedtable && type->getTypeCode()!=type_void) | ||
{ | ||
if (attribs && queryAttributeInList(activityAtom,attribs)) | ||
reportError(ERR_EMBEDERROR, errpos, "Embedded activities only supports dataset return type or actions"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
picky -
Embedded activities only support dataset return types or actions
or
Embedded activity only supports a dataset return type or action
…urn type Signed-off-by: Shamser Ahmed <shamser.ahmed@lexisnexis.co.uk>
Signed-off-by: Shamser Ahmed shamser.ahmed@lexisnexis.co.uk
Type of change:
Checklist:
Testing: