注释oracle.py文件中filter_sql函数内容,以修复该部分引入的错误ORA-00918 #2796
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
1、oracle.py的646行filter_sql函数作用是限制查询返回的行数。如果查询SQL的查询字段列表包含同名列,经过filter_sql函数处理之后的SQL,因为查询字段列表sql_audit.中存在相同名称的列,在数据库中执行会报错ORA-00918。原查询SQL的查询字段列表虽然存在同名列,但有不同的表别名来区分,因此在数据库中执行不会报错。例如sql:select a.,b.* from a,b where a.custid=b.custid;
该SQL可以在数据库中正常执行,但在archery平台上执行会报错ORA-00918。
2、oracle.py中689行cursor.fetchmany(int(limit_num))已经有限制查询返回行数的作用,所以不必通过filter_sql函数来再次限制查询返回行数。