Open roberthheise opened 2 years ago
Same here, using pyspark==3.1.2
java.lang.NoSuchMethodError:
'org.apache.spark.sql.catalyst.expressions.aggregate.AggregateExpression
and
session = SparkSession.builder \
.config("spark.jars.packages", pydeequ.deequ_maven_coord) \
.config("spark.jars.excludes", pydeequ.f2j_maven_coord) \
.master("local") \
.appName("my_app") \
.getOrCreate()
Describe the bug When importing the test_suggestions.py class, each test function is failing
To Reproduce Steps to reproduce the behavior:
Expected behavior The tests should pass
Desktop (please complete the following information):
Additional context /Users/rheise/PycharmProjects/validation/venv/bin/python "/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pycharm/_jb_pytest_runner.py" --target test_suggestions.py::TestSuggestions Testing started at 9:43 AM ... Launching pytest with arguments test_suggestions.py::TestSuggestions --no-header --no-summary -q in /Users/rheise/PycharmProjects/validation
============================= test session starts ============================== collecting ... collected 8 items
test_suggestions.py::TestSuggestions::test_CategoricalRangeRule :: loading settings :: url = jar:file:/Users/rheise/PycharmProjects/validation/venv/lib/python3.8/site-packages/pyspark/jars/ivy-2.5.0.jar!/org/apache/ivy/core/settings/ivysettings.xml WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.apache.spark.unsafe.Platform (file:/Users/rheise/PycharmProjects/validation/venv/lib/python3.8/site-packages/pyspark/jars/spark-unsafe_2.12-3.2.0.jar) to constructor java.nio.DirectByteBuffer(long,int) WARNING: Please consider reporting this to the maintainers of org.apache.spark.unsafe.Platform WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release Ivy Default Cache set to: /Users/rheise/.ivy2/cache The jars for the packages stored in: /Users/rheise/.ivy2/jars com.amazon.deequ#deequ added as a dependency :: resolving dependencies :: org.apache.spark#spark-submit-parent-20aa5f03-82aa-42b6-9e39-e6049dc4523b;1.0 confs: [default] found com.amazon.deequ#deequ;1.2.2-spark-3.0 in central found org.scalanlp#breeze_2.12;0.13.2 in central found org.scalanlp#breeze-macros_2.12;0.13.2 in central found org.scala-lang#scala-reflect;2.12.1 in central found com.github.fommil.netlib#core;1.1.2 in central found net.sf.opencsv#opencsv;2.3 in central found com.github.rwl#jtransforms;2.4.0 in central found junit#junit;4.8.2 in central found org.apache.commons#commons-math3;3.2 in central found org.spire-math#spire_2.12;0.13.0 in central found org.spire-math#spire-macros_2.12;0.13.0 in central found org.typelevel#machinist_2.12;0.6.1 in central found com.chuusai#shapeless_2.12;2.3.2 in central found org.typelevel#macro-compat_2.12;1.1.1 in central found org.slf4j#slf4j-api;1.7.5 in central :: resolution report :: resolve 318ms :: artifacts dl 17ms :: modules in use: com.amazon.deequ#deequ;1.2.2-spark-3.0 from central in [default] com.chuusai#shapeless_2.12;2.3.2 from central in [default] com.github.fommil.netlib#core;1.1.2 from central in [default] com.github.rwl#jtransforms;2.4.0 from central in [default] junit#junit;4.8.2 from central in [default] net.sf.opencsv#opencsv;2.3 from central in [default] org.apache.commons#commons-math3;3.2 from central in [default] org.scala-lang#scala-reflect;2.12.1 from central in [default] org.scalanlp#breeze-macros_2.12;0.13.2 from central in [default] org.scalanlp#breeze_2.12;0.13.2 from central in [default] org.slf4j#slf4j-api;1.7.5 from central in [default] org.spire-math#spire-macros_2.12;0.13.0 from central in [default] org.spire-math#spire_2.12;0.13.0 from central in [default] org.typelevel#machinist_2.12;0.6.1 from central in [default] org.typelevel#macro-compat_2.12;1.1.1 from central in [default] :: evicted modules: org.scala-lang#scala-reflect;2.12.0 by [org.scala-lang#scala-reflect;2.12.1] in [default]
:: retrieving :: org.apache.spark#spark-submit-parent-20aa5f03-82aa-42b6-9e39-e6049dc4523b confs: [default] 0 artifacts copied, 15 already retrieved (0kB/8ms) 21/11/10 09:43:49 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties Setting default log level to "WARN". To adjust logging level use sc.setLogLevel(newLevel). For SparkR, use setLogLevel(newLevel). FAILED [ 12%] test_suggestions.py:32 (TestSuggestions.test_CategoricalRangeRule) self =
test_suggestions.py:34:
venv/lib/python3.8/site-packages/pydeequ/suggestions.py:81: in run result = self._ConstraintSuggestionRunBuilder.run() venv/lib/python3.8/site-packages/py4j/java_gateway.py:1309: in call return_value = get_return_value( venv/lib/python3.8/site-packages/pyspark/sql/utils.py:111: in deco return f(*a, **kw)
answer = 'xro102' gateway_client = <py4j.clientserver.JavaClient object at 0x1212e3a60> target_id = 'o99', name = 'run'
venv/lib/python3.8/site-packages/py4j/protocol.py:326: Py4JJavaError FAILED [ 25%] test_suggestions.py:36 (TestSuggestions.test_CompleteIfCompleteRule) self =
test_suggestions.py:38:
venv/lib/python3.8/site-packages/pydeequ/suggestions.py:81: in run result = self._ConstraintSuggestionRunBuilder.run() venv/lib/python3.8/site-packages/py4j/java_gateway.py:1309: in call return_value = get_return_value( venv/lib/python3.8/site-packages/pyspark/sql/utils.py:111: in deco return f(*a, **kw)
answer = 'xro106' gateway_client = <py4j.clientserver.JavaClient object at 0x1212e3a60> target_id = 'o103', name = 'run'
venv/lib/python3.8/site-packages/py4j/protocol.py:326: Py4JJavaError FAILED [ 37%] test_suggestions.py:40 (TestSuggestions.test_FractionalCategoricalRangeRule) self =
test_suggestions.py:43:
venv/lib/python3.8/site-packages/pydeequ/suggestions.py:81: in run result = self._ConstraintSuggestionRunBuilder.run() venv/lib/python3.8/site-packages/py4j/java_gateway.py:1309: in call return_value = get_return_value( venv/lib/python3.8/site-packages/pyspark/sql/utils.py:111: in deco return f(*a, **kw)
answer = 'xro110' gateway_client = <py4j.clientserver.JavaClient object at 0x1212e3a60> target_id = 'o107', name = 'run'
venv/lib/python3.8/site-packages/py4j/protocol.py:326: Py4JJavaError FAILED [ 50%] test_suggestions.py:46 (TestSuggestions.test_NonNegativeNumbersRule) self =
test_suggestions.py:48:
venv/lib/python3.8/site-packages/pydeequ/suggestions.py:81: in run result = self._ConstraintSuggestionRunBuilder.run() venv/lib/python3.8/site-packages/py4j/java_gateway.py:1309: in call return_value = get_return_value( venv/lib/python3.8/site-packages/pyspark/sql/utils.py:111: in deco return f(*a, **kw)
answer = 'xro114' gateway_client = <py4j.clientserver.JavaClient object at 0x1212e3a60> target_id = 'o111', name = 'run'
venv/lib/python3.8/site-packages/py4j/protocol.py:326: Py4JJavaError FAILED [ 62%] test_suggestions.py:50 (TestSuggestions.test_RetainCompletenessRule) self =
test_suggestions.py:52:
venv/lib/python3.8/site-packages/pydeequ/suggestions.py:81: in run result = self._ConstraintSuggestionRunBuilder.run() venv/lib/python3.8/site-packages/py4j/java_gateway.py:1309: in call return_value = get_return_value( venv/lib/python3.8/site-packages/pyspark/sql/utils.py:111: in deco return f(*a, **kw)
answer = 'xro118' gateway_client = <py4j.clientserver.JavaClient object at 0x1212e3a60> target_id = 'o115', name = 'run'
venv/lib/python3.8/site-packages/py4j/protocol.py:326: Py4JJavaError FAILED [ 75%] test_suggestions.py:54 (TestSuggestions.test_RetainTypeRule) self =
test_suggestions.py:56:
venv/lib/python3.8/site-packages/pydeequ/suggestions.py:81: in run result = self._ConstraintSuggestionRunBuilder.run() venv/lib/python3.8/site-packages/py4j/java_gateway.py:1309: in call return_value = get_return_value( venv/lib/python3.8/site-packages/pyspark/sql/utils.py:111: in deco return f(*a, **kw)
answer = 'xro122' gateway_client = <py4j.clientserver.JavaClient object at 0x1212e3a60> target_id = 'o119', name = 'run'
venv/lib/python3.8/site-packages/py4j/protocol.py:326: Py4JJavaError FAILED [ 87%] test_suggestions.py:58 (TestSuggestions.test_UniqueIfApproximatelyUniqueRule) self =
test_suggestions.py:61:
venv/lib/python3.8/site-packages/pydeequ/suggestions.py:81: in run result = self._ConstraintSuggestionRunBuilder.run() venv/lib/python3.8/site-packages/py4j/java_gateway.py:1309: in call return_value = get_return_value( venv/lib/python3.8/site-packages/pyspark/sql/utils.py:111: in deco return f(*a, **kw)
answer = 'xro126' gateway_client = <py4j.clientserver.JavaClient object at 0x1212e3a60> target_id = 'o123', name = 'run'
venv/lib/python3.8/site-packages/py4j/protocol.py:326: Py4JJavaError FAILED [100%] test_suggestions.py:64 (TestSuggestions.test_default) self =
test_suggestions.py:66:
venv/lib/python3.8/site-packages/pydeequ/suggestions.py:81: in run result = self._ConstraintSuggestionRunBuilder.run() venv/lib/python3.8/site-packages/py4j/java_gateway.py:1309: in call return_value = get_return_value( venv/lib/python3.8/site-packages/pyspark/sql/utils.py:111: in deco return f(*a, **kw)
answer = 'xro142' gateway_client = <py4j.clientserver.JavaClient object at 0x1212e3a60> target_id = 'o127', name = 'run'
venv/lib/python3.8/site-packages/py4j/protocol.py:326: Py4JJavaError
test_suggestions.py::TestSuggestions::test_CompleteIfCompleteRule test_suggestions.py::TestSuggestions::test_FractionalCategoricalRangeRule test_suggestions.py::TestSuggestions::test_NonNegativeNumbersRule test_suggestions.py::TestSuggestions::test_RetainCompletenessRule test_suggestions.py::TestSuggestions::test_RetainTypeRule test_suggestions.py::TestSuggestions::test_UniqueIfApproximatelyUniqueRule test_suggestions.py::TestSuggestions::test_default
============================== 8 failed in 7.66s ===============================
Process finished with exit code 1