{"record":{"id":"211902f8ddcb31fa","repo":"prestodb/presto","slug":"write-validation-failed-unexpected-bloom-filter-i","errorCode":null,"errorMessage":"Write validation failed: unexpected bloom filter in %s statistics","messagePattern":"Write validation failed: unexpected bloom filter in (.+?) statistics","errorType":"exception","errorClass":"OrcCorruptionException","httpStatus":null,"severity":"error","filePath":"presto-orc/src/main/java/com/facebook/presto/orc/OrcWriteValidation.java","lineNumber":586,"sourceCode":"        if (!Objects.equals(actualColumnStatistics.getStringStatistics(), expectedStringStatistics) && expectedStringStatistics != null) {\n            // expectedStringStatistics (or the min/max of it) could be null while the actual one might not because\n            // expectedStringStatistics is calculated by merging all row group stats in the stripe but the actual one is by scanning each row in the stripe on disk.\n            // Merging row group stats can produce nulls given we have string stats limit.\n            if (actualStringStatistics == null ||\n                    actualStringStatistics.getSum() != expectedStringStatistics.getSum() ||\n                    (expectedStringStatistics.getMax() != null && !Objects.equals(actualStringStatistics.getMax(), expectedStringStatistics.getMax())) ||\n                    (expectedStringStatistics.getMin() != null && !Objects.equals(actualStringStatistics.getMin(), expectedStringStatistics.getMin()))) {\n                throw new OrcCorruptionException(orcDataSourceId, \"Write validation failed: unexpected string range in %s statistics\", name);\n            }\n        }\n        if (!Objects.equals(actualColumnStatistics.getDateStatistics(), expectedColumnStatistics.getDateStatistics())) {\n            throw new OrcCorruptionException(orcDataSourceId, \"Write validation failed: unexpected date range in %s statistics\", name);\n        }\n        if (!Objects.equals(actualColumnStatistics.getDecimalStatistics(), expectedColumnStatistics.getDecimalStatistics())) {\n            throw new OrcCorruptionException(orcDataSourceId, \"Write validation failed: unexpected decimal range in %s statistics\", name);\n        }\n        if (!Objects.equals(actualColumnStatistics.getBloomFilter(), expectedColumnStatistics.getBloomFilter())) {\n            throw new OrcCorruptionException(orcDataSourceId, \"Write validation failed: unexpected bloom filter in %s statistics\", name);\n        }\n    }\n\n    public static class WriteChecksum\n    {\n        private final long totalRowCount;\n        private final long stripeHash;\n        private final List<Long> columnHashes;\n\n        public WriteChecksum(long totalRowCount, long stripeHash, List<Long> columnHashes)\n        {\n            this.totalRowCount = totalRowCount;\n            this.stripeHash = stripeHash;\n            this.columnHashes = columnHashes;\n        }\n\n        public long getTotalRowCount()\n        {","sourceCodeStart":568,"sourceCodeEnd":604,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-orc/src/main/java/com/facebook/presto/orc/OrcWriteValidation.java#L568-L604","documentation":"Write-validation error: the bloom filter recorded for a column's statistics differs from the one present in the re-read file (or exists where none was expected). The %s names the statistics section; a post-write consistency check for bloom filter indexes.","triggerScenarios":"Thrown at presto-orc/src/main/java/com/facebook/presto/orc/OrcWriteValidation.java:586 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Report as an ORC writer bug with validation output","Check bloom filter writing config consistency across workers","Rewrite the file and re-validate"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}