From 7816564edc7105b27cb0e05ea540816fb4463ba9 Mon Sep 17 00:00:00 2001 From: Taksh Date: Sun, 19 Jul 2026 16:30:18 +0300 Subject: [PATCH 1/2] fix: match validate_concepts tables by exact name From 0620244db4993d4ea01848902c62b65e129750ed Mon Sep 17 00:00:00 2001 From: Taksh Date: Sun, 19 Jul 2026 16:30:39 +0300 Subject: [PATCH 2/2] fix: exact table name match in validate_concepts.sh --- mimic-iv/concepts/validate_concepts.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mimic-iv/concepts/validate_concepts.sh b/mimic-iv/concepts/validate_concepts.sh index eeaddb82..645a82a3 100755 --- a/mimic-iv/concepts/validate_concepts.sh +++ b/mimic-iv/concepts/validate_concepts.sh @@ -32,7 +32,8 @@ fail=0 missing=0 while read -r tbl; do [ -z "${tbl}" ] && continue - if ! grep -q "^${tbl}," <<< "${ACTUAL}"; then + # exact field match (regex grep can false-hit prefixes) + if ! awk -F, -v t="${tbl}" '$1 == t { found=1 } END { exit !found }' <<< "${ACTUAL}"; then echo "MISSING: expected table ${DATASET}.${tbl} was not built" missing=1 fail=1 @@ -47,7 +48,7 @@ empty=0 while IFS=, read -r tbl rows; do [ -z "${tbl}" ] && continue # only validate the tables we actually build (ignore _metadata and any strays) - if grep -qx "${tbl}" <<< "${EXPECTED}" && [ "${rows}" -eq 0 ]; then + if grep -Fxq "${tbl}" <<< "${EXPECTED}" && [ "${rows:-}" -eq 0 ]; then echo "EMPTY: table ${DATASET}.${tbl} has 0 rows" empty=1 fail=1