huaxingao commented on a change in pull request #30038:
URL: https://github.com/apache/spark/pull/30038#discussion_r505876158
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/jdbc/MsSqlServerDialect.scala
##########
@@ -64,4 +65,39 @@ private object MsSqlServerDialect extends JdbcDialect {
override def renameTable(oldTable: String, newTable: String): String = {
s"EXEC sp_rename $oldTable, $newTable"
}
+
+ // scalastyle:off line.size.limit
+ // see
https://docs.microsoft.com/en-us/sql/relational-databases/tables/add-columns-to-a-table-database-engine?view=sql-server-ver15
+ // scalastyle:on line.size.limit
+ override def getAddColumnQuery(
+ tableName: String,
+ columnName: String,
+ dataType: String): String = {
+ s"ALTER TABLE $tableName ADD $columnName $dataType"
Review comment:
$columnName -> ${quoteIdentifier(columnName)}
please see #30041
----------------------------------------------------------------
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]