@@ -128,6 +128,11 @@ void methodsThrowAfterClose() {
128128 df .close ();
129129 assertThrows (IllegalStateException .class , () -> df .select ("x" ));
130130 assertThrows (IllegalStateException .class , () -> df .filter ("x > 0" ));
131+ assertThrows (IllegalStateException .class , () -> df .limit (1 ));
132+ assertThrows (IllegalStateException .class , () -> df .limit (0 , 1 ));
133+ assertThrows (IllegalStateException .class , df ::distinct );
134+ assertThrows (IllegalStateException .class , () -> df .dropColumns ("x" ));
135+ assertThrows (IllegalStateException .class , () -> df .withColumnRenamed ("x" , "y" ));
131136 assertThrows (IllegalStateException .class , df ::count );
132137 assertThrows (IllegalStateException .class , df ::show );
133138 assertThrows (IllegalStateException .class , () -> df .show (5 ));
@@ -144,6 +149,11 @@ void methodsThrowAfterCollect() throws Exception {
144149 }
145150 assertThrows (IllegalStateException .class , () -> df .select ("x" ));
146151 assertThrows (IllegalStateException .class , () -> df .filter ("x > 0" ));
152+ assertThrows (IllegalStateException .class , () -> df .limit (1 ));
153+ assertThrows (IllegalStateException .class , () -> df .limit (0 , 1 ));
154+ assertThrows (IllegalStateException .class , df ::distinct );
155+ assertThrows (IllegalStateException .class , () -> df .dropColumns ("x" ));
156+ assertThrows (IllegalStateException .class , () -> df .withColumnRenamed ("x" , "y" ));
147157 assertThrows (IllegalStateException .class , df ::count );
148158 assertThrows (IllegalStateException .class , df ::show );
149159 assertThrows (IllegalStateException .class , () -> df .show (5 ));
0 commit comments