-
Notifications
You must be signed in to change notification settings - Fork 29.1k
[SPARK-33084][CORE][SQL] Add jar support ivy path #29966
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
afaf7bd
51daf9a
3579de0
d6e8caf
169e1f8
0e589ec
b3e3211
9161340
0e3c1ec
300ca56
63e877b
733e62c
b60ba1e
883b9d3
208afc2
ba9ea29
10b3737
7f878c2
d2c1950
2200076
5a9cc30
875d8a7
e921245
614a865
8c5cb7c
f460974
1f7dc01
050c410
ff611a6
03aca3b
653b919
6e48275
bdc5035
9c22882
9c88f8d
8220e5a
49ac62c
b69a62e
273a5ac
ebe1c9c
6034fb2
e22e398
afea73f
13000f2
bce3d40
d53f302
57c351d
8c53b83
4048c5b
aa53482
2ffb431
8c18cdf
6bd41cd
fbc236c
90491d5
75ff3ce
4c44dae
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| /* | ||
| * 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.util | ||
|
|
||
| import java.net.URI | ||
|
|
||
| import org.apache.spark.SparkFunSuite | ||
|
|
||
| object DependencyUtils extends SparkFunSuite { | ||
|
|
||
| test("SPARK-33084: Add jar support Ivy URI -- test invalid ivy uri") { | ||
| val e1 = intercept[IllegalArgumentException] { | ||
| DependencyUtils.resolveMavenDependencies(URI.create("ivy://")) | ||
| }.getMessage | ||
| assert(e1.contains("Expected authority at index 6: ivy://")) | ||
|
|
||
| val e2 = intercept[IllegalArgumentException] { | ||
| DependencyUtils.resolveMavenDependencies(URI.create("ivy://org.apache.hive:hive-contrib")) | ||
| }.getMessage | ||
| assert(e2.contains("Invalid Ivy URI authority in uri ivy://org.apache.hive:hive-contrib:" + | ||
| " Expected 'org:module:version', found org.apache.hive:hive-contrib.")) | ||
|
|
||
| val e3 = intercept[IllegalArgumentException] { | ||
| DependencyUtils.resolveMavenDependencies( | ||
| URI.create("ivy://org.apache.hive:hive-contrib:2.3.7?foo=")) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to keep
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Emmm, is there any concern about this?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
How about #31118 |
||
| }.getMessage | ||
| assert(e3.contains("Invalid query string in Ivy URI" + | ||
| " ivy://org.apache.hive:hive-contrib:2.3.7?foo=:")) | ||
|
|
||
| val e4 = intercept[IllegalArgumentException] { | ||
| DependencyUtils.resolveMavenDependencies( | ||
| URI.create("ivy://org.apache.hive:hive-contrib:2.3.7?bar=&baz=foo")) | ||
| }.getMessage | ||
| assert(e4.contains("Invalid query string in Ivy URI" + | ||
| " ivy://org.apache.hive:hive-contrib:2.3.7?bar=&baz=foo: bar=&baz=foo")) | ||
|
|
||
| val e5 = intercept[IllegalArgumentException] { | ||
| DependencyUtils.resolveMavenDependencies( | ||
| URI.create("ivy://org.apache.hive:hive-contrib:2.3.7?exclude=org.pentaho")) | ||
| }.getMessage | ||
| assert(e5.contains("Invalid exclude string in Ivy URI" + | ||
| " ivy://org.apache.hive:hive-contrib:2.3.7?exclude=org.pentaho:" + | ||
| " expected 'org:module,org:module,..', found org.pentaho")) | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test name is already used at line 1143.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just follow comment forgot to check this. changed to
test("SPARK-33084: Add jar support Ivy URI -- test param key case sensitive")