gaborgsomogyi commented on a change in pull request #28635:
URL: https://github.com/apache/spark/pull/28635#discussion_r429985739



##########
File path: 
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/jdbc/connection/MSSQLConnectionProviderSuite.scala
##########
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.sql.execution.datasources.jdbc.connection
+
+class MSSQLConnectionProviderSuite extends ConnectionProviderSuiteBase {
+  test("setAuthenticationConfigIfNeeded default parser must set authentication 
if not set") {
+    val driver = registerDriver(MSSQLConnectionProvider.driverClass)
+    val defaultProvider = new MSSQLConnectionProvider(
+      driver, options("jdbc:sqlserver://localhost/mssql"))
+    val customProvider = new MSSQLConnectionProvider(
+      driver, 
options(s"jdbc:sqlserver://localhost/mssql;jaasConfigurationName=custommssql"))
+
+    testProviders(defaultProvider, customProvider)
+  }
+
+  test("setAuthenticationConfigIfNeeded custom parser must set authentication 
if not set") {
+    val parserMethod = "IntentionallyNotExistingMethod"
+    val driver = registerDriver(MSSQLConnectionProvider.driverClass)
+    val defaultProvider = new MSSQLConnectionProvider(
+      driver, options("jdbc:sqlserver://localhost/mssql"), parserMethod)
+    val customProvider = new MSSQLConnectionProvider(
+      driver,
+      
options(s"jdbc:sqlserver://localhost/mssql;jaasConfigurationName=custommssql"),

Review comment:
       Fixed.

##########
File path: dev/deps/spark-deps-hadoop-3.2-hive-2.3
##########
@@ -183,7 +183,6 @@ metrics-jmx/4.1.1//metrics-jmx-4.1.1.jar
 metrics-json/4.1.1//metrics-json-4.1.1.jar
 metrics-jvm/4.1.1//metrics-jvm-4.1.1.jar
 minlog/1.3.0//minlog-1.3.0.jar
-mssql-jdbc/6.2.1.jre7//mssql-jdbc-6.2.1.jre7.jar

Review comment:
       I've just double checked and it has been added by a guy at 24 Nov 2019 
[here](https://github.com/apache/spark/blob/a1706e2fa745a8d4aebeebd1663366e13ba80c8c/dev/deps/spark-deps-hadoop-3.2-hive-2.3)
 :)
   You can ask him what was the reason :D

##########
File path: dev/deps/spark-deps-hadoop-3.2-hive-2.3
##########
@@ -183,7 +183,6 @@ metrics-jmx/4.1.1//metrics-jmx-4.1.1.jar
 metrics-json/4.1.1//metrics-json-4.1.1.jar
 metrics-jvm/4.1.1//metrics-jvm-4.1.1.jar
 minlog/1.3.0//minlog-1.3.0.jar
-mssql-jdbc/6.2.1.jre7//mssql-jdbc-6.2.1.jre7.jar

Review comment:
       > could you make another PR for this dependency clean-up?
   
   Sure. Creating a jira + PR...
   

##########
File path: dev/deps/spark-deps-hadoop-3.2-hive-2.3
##########
@@ -183,7 +183,6 @@ metrics-jmx/4.1.1//metrics-jmx-4.1.1.jar
 metrics-json/4.1.1//metrics-json-4.1.1.jar
 metrics-jvm/4.1.1//metrics-jvm-4.1.1.jar
 minlog/1.3.0//minlog-1.3.0.jar
-mssql-jdbc/6.2.1.jre7//mssql-jdbc-6.2.1.jre7.jar

Review comment:
       Filed https://issues.apache.org/jira/browse/SPARK-31821

##########
File path: dev/deps/spark-deps-hadoop-3.2-hive-2.3
##########
@@ -183,7 +183,6 @@ metrics-jmx/4.1.1//metrics-jmx-4.1.1.jar
 metrics-json/4.1.1//metrics-json-4.1.1.jar
 metrics-jvm/4.1.1//metrics-jvm-4.1.1.jar
 minlog/1.3.0//minlog-1.3.0.jar
-mssql-jdbc/6.2.1.jre7//mssql-jdbc-6.2.1.jre7.jar

Review comment:
       I've just double checked and it has been added by a guy at 24 Nov 2019 
[here](https://github.com/apache/spark/blob/a1706e2fa745a8d4aebeebd1663366e13ba80c8c/dev/deps/spark-deps-hadoop-3.2-hive-2.3)
 :)
   You can ask him what was the reason :D
   
   Just to be clear not making fun of you, just funny situation in my view...
   

##########
File path: dev/deps/spark-deps-hadoop-3.2-hive-2.3
##########
@@ -183,7 +183,6 @@ metrics-jmx/4.1.1//metrics-jmx-4.1.1.jar
 metrics-json/4.1.1//metrics-json-4.1.1.jar
 metrics-jvm/4.1.1//metrics-jvm-4.1.1.jar
 minlog/1.3.0//minlog-1.3.0.jar
-mssql-jdbc/6.2.1.jre7//mssql-jdbc-6.2.1.jre7.jar

Review comment:
       Thanks @dongjoon-hyun Going to roll back the dep remove here as soon as 
SPARK-31821 is merged.

##########
File path: dev/deps/spark-deps-hadoop-3.2-hive-2.3
##########
@@ -183,7 +183,6 @@ metrics-jmx/4.1.1//metrics-jmx-4.1.1.jar
 metrics-json/4.1.1//metrics-json-4.1.1.jar
 metrics-jvm/4.1.1//metrics-jvm-4.1.1.jar
 minlog/1.3.0//minlog-1.3.0.jar
-mssql-jdbc/6.2.1.jre7//mssql-jdbc-6.2.1.jre7.jar

Review comment:
       > But, that is an auto-generated file.
   
   Now I see :) Just fixed the other PR.




----------------------------------------------------------------
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:
us...@infra.apache.org



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

Reply via email to