cloud-fan commented on a change in pull request #31131:
URL: https://github.com/apache/spark/pull/31131#discussion_r555569367



##########
File path: 
sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLCommandTestUtils.scala
##########
@@ -91,4 +91,20 @@ trait DDLCommandTestUtils extends SQLTestUtils {
   }
 
   protected def checkLocation(t: String, spec: TablePartitionSpec, expected: 
String): Unit
+
+  // Getting the total table size in the filesystem in bytes
+  def getTableSize(tableName: String): Int = {
+    val stats =
+      sql(s"DESCRIBE TABLE EXTENDED $tableName")
+        .select("data_type")
+        .where("col_name = 'Statistics'")

Review comment:
       nit: let's call `where` before `select`, otherwise the query looks 
weird.  There should be no `col_name` column after `select("data_type")`




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to