Skip to content

Commit

Permalink
[8080] Return error on invalid GenQuery1 aggregate function.
Browse files Browse the repository at this point in the history
  • Loading branch information
korydraughn committed Feb 5, 2025
1 parent ef4e7f8 commit 6574506
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/core/include/irods/rodsErrorTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ NEW_ERROR(TYPE_NOT_SUPPORTED, -177000)
NEW_ERROR(AUTHENTICATION_ERROR, -178000)
NEW_ERROR(SOCKET_ERROR, -179000)
NEW_ERROR(CONFIGURATION_ERROR, -180000)
NEW_ERROR(INVALID_GENQUERY_AGGREGATE_FUNCTION, -181000)

/** @} */

Expand Down
2 changes: 1 addition & 1 deletion lib/core/src/rcMisc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3098,7 +3098,7 @@ getSelVal( char * c ) {
}
// =-=-=-=-=-=-=-

return 1;
return INVALID_GENQUERY_AGGREGATE_FUNCTION;
}


Expand Down
3 changes: 3 additions & 0 deletions scripts/irods/test/test_iquest.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ def test_iquest_incorrect_format_count(self):
self.admin.assert_icommand("iquest \"%s %s\" \"select COLL_NAME where COLL_NAME like '%home%'\"",
'STDERR_SINGLELINE', 'boost::too_few_args: format-string referred to more arguments than were passed')

def test_iquest_returns_error_on_invalid_aggregate_function__issue_8080(self):
self.admin.assert_icommand(['iquest', 'select nope(DATA_ID)'], 'STDERR', ['-181000 INVALID_GENQUERY_AGGREGATE_FUNCTION'])


class test_iquest_with_data_resc_hier(unittest.TestCase):
@classmethod
Expand Down

0 comments on commit 6574506

Please sign in to comment.