Index: resultSetForSetProvider.sql
===================================================================
--- resultSetForSetProvider.sql	(revision 46105)
+++ resultSetForSetProvider.sql	(revision 46106)
@@ -6,7 +6,7 @@
     "ID", "Byte", "Bool1", "Long", "Timestamp", "Date", "Time", 
     "Bool2", "String", "Bool3", "Double", "Bool4", "Float", "Bool5", "Decimal", 
     NVL2("Geometry",ST_AsBinary("Geometry"),NULL) 
-  FROM "PUBLIC"."test" ORDER BY "ID" ASC;
+  FROM "PUBLIC"."test" ORDER BY "ID" ASC NULLS LAST;
 
 -- Simple Group by
 SELECT 
@@ -16,7 +16,7 @@
     NULL AS "Bool4", NULL AS "Float", NULL AS "Bool5", NULL AS "Decimal", 
     NULL AS "Geometry" 
   FROM "PUBLIC"."test" 
-  GROUP BY "test"."Long" ORDER BY "test"."Long" ASC, "ID" ASC;
+  GROUP BY "test"."Long" ORDER BY "test"."Long" ASC NULLS LAST, "ID" ASC NULLS LAST;
 
 -- Subselect
 SELECT 
@@ -34,7 +34,7 @@
     SELECT "ISO_A2" 
     FROM "countries" 
     WHERE (("TEST"."STRING" = "countries"."CONTINENT") AND 
-      ("countries"."LASTCENSUS" < 0)) LIMIT 1)),TRUE,FALSE) ORDER BY "ID" ASC;
+      ("countries"."LASTCENSUS" < 0)) LIMIT 1)),TRUE,FALSE) ORDER BY "ID" ASC NULLS LAST;
 
 -- Group and Subselect
 SELECT 
@@ -49,21 +49,21 @@
     FROM "countries" 
     WHERE (("TEST"."STRING" = "countries"."CONTINENT") AND 
       ("countries"."LASTCENSUS" < 0)) LIMIT 1)),TRUE,FALSE) 
-  GROUP BY "test"."Long" ORDER BY "test"."Long" ASC, "ID" ASC;
+  GROUP BY "test"."Long" ORDER BY "test"."Long" ASC NULLS LAST, "ID" ASC NULLS LAST;
 
 -- Simple
 SELECT 
     "Byte", "Bool1", "Long", "Timestamp", "Date", "Time", 
     "Bool2", "String", "Bool3", "Double", "Bool4", "Float", "Bool5", "Decimal", 
     NVL2("Geometry",ST_AsBinary("Geometry"),NULL), "ID" 
-  FROM "PUBLIC"."test" ORDER BY "ID" ASC;
+  FROM "PUBLIC"."test" ORDER BY "ID" ASC NULLS LAST;
 
 -- Computed Attribute
 SELECT "ID", "Byte", "Bool1", "Long", "Timestamp", "Date", "Time", 
     "Bool2", "String", "Bool3", "Double", "Bool4", "Float", "Bool5", "Decimal", 
     NVL2("Geometry",ST_AsBinary("Geometry"),NULL), 
     ("ID" * 2) AS "Compu1" 
-FROM "PUBLIC"."test" ORDER BY "ID" ASC;
+FROM "PUBLIC"."test" ORDER BY "ID" ASC NULLS LAST;
 
 -- Computed Attribute 2
 SELECT "ID", "Byte", "Bool1", "Long", "Timestamp", "Date", "Time", 
@@ -71,7 +71,7 @@
     NVL2("Geometry",ST_AsBinary("Geometry"),NULL), 
     ("ID" * 2) AS "Compu1", 
     (("Long" + 10) + ("ID" * 2)) AS "Compu2" 
-FROM "PUBLIC"."test" ORDER BY "ID" ASC;
+FROM "PUBLIC"."test" ORDER BY "ID" ASC NULLS LAST;
 
 -- Computed Extra column 1
 SELECT "ID", "Byte", "Bool1", "Long", "Timestamp", "Date", "Time", 
@@ -79,7 +79,7 @@
     NVL2("Geometry",ST_AsBinary("Geometry"),NULL), 
     ("ID" * 2) AS "Compu1", 
     (("Long" + 10) + ("ID" * 2)) AS "Extra1" 
-FROM "PUBLIC"."test" ORDER BY "ID" ASC;
+FROM "PUBLIC"."test" ORDER BY "ID" ASC NULLS LAST;
 
 -- Computed Extra column 2
 SELECT "ID", "Byte", "Bool1", "Long", "Timestamp", "Date", "Time", 
@@ -87,7 +87,7 @@
     NVL2("Geometry",ST_AsBinary("Geometry"),NULL), 
     ("ID" * 2) AS "Extra1", 
     (("Long" + 10) + ("ID" * 2)) AS "Extra2" 
-FROM "PUBLIC"."test" ORDER BY "ID" ASC;
+FROM "PUBLIC"."test" ORDER BY "ID" ASC NULLS LAST;
 
 -- Computed Extra column with where
 SELECT "ID", "Byte", "Bool1", "Long", "Timestamp", "Date", "Time", 
@@ -95,7 +95,7 @@
     NVL2("Geometry",ST_AsBinary("Geometry"),NULL), 
     ("ID" * 2) AS "Compu1", 
     (("Long" + 10) + ("ID" * 2)) AS "Extra1" 
-FROM "PUBLIC"."test" WHERE ((("Long" + 10) + (("ID" * 2))) > 10) ORDER BY "Extra1" ASC, "ID" ASC;
+FROM "PUBLIC"."test" WHERE ((("Long" + 10) + (("ID" * 2))) > 10) ORDER BY "Extra1" ASC NULLS LAST, "ID" ASC NULLS LAST;
 
 -- Group by with computed columns and aggregate functions
 SELECT MIN("test"."ID") AS "ID", MAX("test"."Byte") AS "Byte", NULL AS "Bool1", "Long", 
@@ -108,4 +108,4 @@
     SUM(((20 + "Byte") + ("ID" * 2))) AS "Extra2", 
     (("Long" + 10) + (("ID" * 2))) AS "Extra1" 
 FROM "PUBLIC"."test" GROUP BY "test"."Long", (("Long" + 10) + (("ID" * 2))), (("ID" * 2)) 
-ORDER BY "test"."Long" ASC, "Extra1" ASC, "Compu1" ASC, "ID" ASC;
+ORDER BY "test"."Long" ASC NULLS LAST, "Extra1" ASC NULLS LAST, "Compu1" ASC NULLS LAST, "ID" ASC NULLS LAST;
