SnowConvert AI - Ambiguous Comments Validation¶
설명¶
이 유효성 검사 단계에서는 입력 코드에 모호한 설명(/*/
)을 생성할 수 있는 문자 시퀀스가 있는지 확인합니다.
입력 코드에 모호한 설명이 있는 경우 다음과 같이 경고가 포함된 창이 표시됩니다.
또한 ScopeValidation 보고서에서 실패한 파일에 대한 정보를 확인할 수 있습니다.
왜 모호한가요?¶
Block comments on SQL start with /*
and end with */
. When the character sequence /*/
is used, depending on the source language, it can start a nesting inside the block comment, or finish the whole block.
다음은 /*/
를 사용하는 유효한 문의 예입니다
select col1,
/*Some comment/*/ */*/
col2,
col3
from
table1;
select col1,
/*Some comment/*/
col2,
col3
from
table1;
select col1,
/*Some comment/*/ */*/
col2,
col3
from
table1;
select col1,
/*Some comment/*/
col2,
col3
from
table1;
보시다시피 설명은 Teradata 및 SQL 서버에서 Oracle 및 Snowflake와 다르게 작동합니다. Teradata에서도 bteq 및 기타 스크립트 언어에 대한 또 다른 처리 방법이 있습니다.
모호성 해결¶
Snowflake에서 코드에서 /*/ 시퀀스가 표시되면 일반적으로 블록 설명이 끝납니다. 그러나 소스 코드에서 다르게 사용하고 있다면 그에 맞게 조정해야 합니다.