When executing certain queries involving nested answer calls within the WHERE clause, the system exceeds the maximum recursion depth.
Query Example
SELECT courses.title, courses.course_codes, offerings.days, offerings.start_time, offerings.end_time, offerings.season
FROM courses
JOIN offerings ON courses.course_id = offerings.course_id
WHERE offerings.season = 'spring'
AND (
answer(description, 'does this course provide a solid mathematical foundation for research in Natural Language Processing?') = 'Yes'
OR answer(description, 'does this course focus on Language Modelling?') = 'Yes'
);
Error Message
The system throws a "maximum recursion depth exceeded" error as detailed below:
maximum recursion depth exceeded
Traceback (most recent call last):
File "/home/larsen/course-companion/sql_free_text_support/execute_free_text_sql.py", line 1086, in suql_execute_single
visitor(root)
...
File "/usr/lib/python3.8/copy.py", line 270, in _reconstruct
state = deepcopy(state, memo)
...
File "/usr/lib/python3.8/copy.py", line 230, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
...
RecursionError: maximum recursion depth exceeded while calling a Python object
Description
When executing certain queries involving nested answer calls within the WHERE clause, the system exceeds the maximum recursion depth.
Query Example
Error Message
The system throws a "maximum recursion depth exceeded" error as detailed below: