Skip to content

Commit

Permalink
Merge pull request #55 from thehyve/issue-254
Browse files Browse the repository at this point in the history
Issue 254
  • Loading branch information
EIjo authored Dec 23, 2024
2 parents 21f46e5 + 8fb5c3c commit 96f02aa
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ public static Database generateModelFromScanReport(String filename) {
field.setDescription(row.getStringByHeaderName(ScanFieldName.DESCRIPTION));
field.setFractionEmpty(row.getDoubleByHeaderName(ScanFieldName.FRACTION_EMPTY));
field.setUniqueCount(row.getIntByHeaderName(ScanFieldName.UNIQUE_COUNT));
field.setFractionUnique(row.getDoubleByHeaderName(ScanFieldName.FRACTION_UNIQUE));
field.setValueCounts(getValueCounts(workbook, tableName, fieldName));

table.getFields().add(field);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,6 @@ private void doOpenScanReport(String filename) {
oldField.setDescription(newField.getDescription());
oldField.setFractionEmpty(newField.getFractionEmpty());
oldField.setUniqueCount(newField.getUniqueCount());
oldField.setFractionUnique(newField.getFractionUnique());
oldField.setNullable(newField.isNullable());
oldField.setValueCounts(newField.getValueCounts());
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,7 @@ private void createFieldOverviewSheet() {
overviewHeader.addAll(Arrays.asList(
ScanFieldName.N_ROWS_CHECKED,
ScanFieldName.FRACTION_EMPTY,
ScanFieldName.UNIQUE_COUNT,
ScanFieldName.FRACTION_UNIQUE
ScanFieldName.UNIQUE_COUNT
));
if (calculateNumericStats) {
overviewHeader.addAll(Arrays.asList(
Expand Down Expand Up @@ -363,12 +362,10 @@ private void createFieldOverviewSheet() {

if (scanValues) {
Long uniqueCount = fieldInfo.uniqueCount;
Double fractionUnique = fieldInfo.getFractionUnique();
values.addAll(Arrays.asList(
fieldInfo.nProcessed,
fieldInfo.getFractionEmpty(),
fieldInfo.hasValuesTrimmed() ? String.format("<= %d", uniqueCount) : uniqueCount,
fieldInfo.hasValuesTrimmed() ? String.format(Locale.ENGLISH, "<= %.3f", fractionUnique) : fractionUnique
fieldInfo.hasValuesTrimmed() ? String.format("<= %d", uniqueCount) : uniqueCount
));
if (calculateNumericStats) {
values.addAll(Arrays.asList(
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 96f02aa

Please sign in to comment.