SnowConvert AI - Code Completeness Score¶

Code Completeness Score値¶
This number represents the percentage of code units whose references to other code units are correctly addressed by SnowConvert AI. If the score is less than one hundred represents that there is at least one code unit referencing one or more code units not included in the source code.
式¶
((total_CU - impacted_CU) / total_CU ) * 100
total_CU = total number of Code Units
impacted_CU = Code Units with missing references
サンプル¶
-- Code Unit with no missing references
CREATE TABLE table1
(
COL1 VARCHAR
)
-- Code Unit with no missing references
SELECT * from table1;
-- Code Unit with a missing reference
SELECT * from missing_table;
-- Code Unit with no missing references
CREATE OR REPLACE TABLE table1
(
COL1 VARCHAR
)
COMMENT = '{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},{"attributes":{"component":"teradata"}}'
;
-- Code Unit with no missing references
SELECT
* from
table1;
-- Code Unit with a missing reference
SELECT
* from
missing_table;
予想されるCode Completeness Score: 66.67
説明: この場合は、3つのコードユニットがあり、そのうちの1つだけに参照がありません。11行目の SELECT は、ソースコードに定義が存在しない「missing_table」という別のコードユニットを参照しているため、この SELECT は、参照が欠落しているコードユニットと見なされます。