diff options
-rw-r--r-- | src/clojure_sql/dsl.clj | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/clojure_sql/dsl.clj b/src/clojure_sql/dsl.clj index 0a05763..5eae2d7 100644 --- a/src/clojure_sql/dsl.clj +++ b/src/clojure_sql/dsl.clj @@ -379,7 +379,8 @@ (assoc query :drop n)))) (defn ^:private union-compatible? [& queries] - (apply = (map (comp set keys :fields) queries))) + (and (every? (comp seq keys :fields) queries) + (apply = (map (comp set keys :fields) queries)))) (defn union "Combine the results of two queries" |