[QP-8003] PgActionAnalyzer에서 Insert Action 시 명시적 컬럼 지정이 있는 경우에는 base 메소드 호출 #78
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.
INSERT INTO [테이블명] [SELECT 쿼리]
의 경우 PostgreSQL는 대상 컬럼이 암시적(implicit)으로 지정됐다고 보고 SELECT 쿼리에서 확인되는 컬럼의 개수만큼 기존 테이블의 가장 왼쪽 컬럼에서부터 차례대로 컬럼을 추출해 Insert Action을 수행합니다. (문서 참조: https://www.postgresql.org/docs/current/sql-insert.html )INSERT INTO [테이블명] (컬럼1, 컬럼2, ...) [SELECT 쿼리]
의 경우 대부분 RDBMS는 Insert Action의 대상 컬럼이 명시적으로 지정되었다고 보고 지정된 각 컬럼에 SELECT 쿼리에서 얻은 결과를 테이블에 삽입하나, 기존 QSI 코드의 PgActionAnalyzer의 경우 Insert Action 쿼리에[SELECT 쿼리]
가 포함되면 일괄적으로 암시적 컬럼 지정으로 보고 처리합니다. 이렇게 되면, 잘못된 컬럼을 지정해 null 대입을 시도하는 등의 문제가 발생합니다. 이 PR은 명시적 컬럼 지정이 있는 경우를 세분화, 적절히 처리합니다. 또한, 이를 확인할 수 있는 테스트 데이터를 추가합니다.추가로, base 메소드의 정상 작동을 확인하기 위해 (이를 override 하지 않는) MySQL 관련 테스트 코드를 추가합니다.