Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/ClickHouseVapor/ClickHouseColumnConvertible.swift
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public extension Field where Value == ClickHouseEnum16 {
extension Array {
/// Only include column rows where the isIncluded array is true
func filtered(_ isIncluded: [Bool]) -> Self {
precondition(count == isIncluded.count)
precondition(count == isIncluded.count, "Filtering model not possible, expected count \(count) but got \(isIncluded.count)")
var arr = Self()
let count = isIncluded.reduce(0, { $0 + ($1 ? 1 : 0) })
arr.reserveCapacity(count)
Expand Down
Loading