diff src/cjr_print.sml @ 1168:69f1d39d3f2d

Use COALESCE to hide NULL results of aggregate functions; fix bug with improper ordering of query result columns
author Adam Chlipala <adamc@hcoop.net>
date Thu, 25 Feb 2010 14:55:35 -0500
parents 8679ba87cf3c
children fd1a49b51db5
line wrap: on
line diff
--- a/src/cjr_print.sml	Sat Feb 13 13:10:05 2010 -0500
+++ b/src/cjr_print.sml	Thu Feb 25 14:55:35 2010 -0500
@@ -1657,8 +1657,8 @@
                                                 map (fn (x', t) => ("__uwf_" ^ ident x ^ ".__uwf_" ^ ident x', t)) xts)
                                             tables
 
-            val outputs = exps @ tables
-            val outputs = ListMergeSort.sort (fn ((s1, _), (s2, _)) => String.compare (s1, s2) = GREATER) outputs
+            val sort = ListMergeSort.sort (fn ((s1, _), (s2, _)) => String.compare (s1, s2) = GREATER)
+            val outputs = sort exps @ sort tables
 
             val wontLeakStrings = notLeaky env true state
             val wontLeakAnything = notLeaky env false state