rednaxelafx commented on a change in pull request #23582: [SPARK-26661][SQL] 
Show actual class name of the writing command in CTAS explain
URL: https://github.com/apache/spark/pull/23582#discussion_r249238568
 
 

 ##########
 File path: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/CreateHiveTableAsSelectCommand.scala
 ##########
 @@ -83,10 +84,14 @@ trait CreateHiveTableAsSelectBase extends 
DataWritingCommand {
     tableDesc: CatalogTable,
     tableExists: Boolean): DataWritingCommand
 
+  // A subclass should override this with the Class of the concrete type 
expected to be
+  // returned from `getWritingCommand`.
+  def writingCommandClass: Class[_]
 
 Review comment:
   It's just me being lazy here. Returning a class allows the code to share a 
single `Utils.getSimpleName` while returning a string would require doing 
`Utils.getSimpleName` separately, or hard code the class name in string literal.
   
   Do you have a strong preference towards returning string here? I can do 
either way

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to