cloud-fan commented on issue #26881: [SPARK-30252][SQL] Disallow negative scale 
of Decimal
URL: https://github.com/apache/spark/pull/26881#issuecomment-575609647
 
 
   ```
   File 
"/home/jenkins/workspace/SparkPullRequestBuilder@2/python/pyspark/sql/types.py",
 line 871, in __main__._parse_datatype_json_string
   Failed example:
       check_datatype(DecimalType(1,-1))
   Exception raised:
       Traceback (most recent call last):
         File "/usr/lib64/pypy-2.5.1/lib-python/2.7/doctest.py", line 1315, in 
__run
           compileflags, 1) in test.globs
         File "<doctest __main__._parse_datatype_json_string[15]>", line 1, in 
<module>
           check_datatype(DecimalType(1,-1))
         File "<doctest __main__._parse_datatype_json_string[1]>", line 4, in 
check_datatype
           scala_datatype = spark._jsparkSession.parseDataType(datatype.json())
         File 
"/home/jenkins/workspace/SparkPullRequestBuilder@2/python/lib/py4j-0.10.8.1-src.zip/py4j/java_gateway.py",
 line 1286, in __call__
           answer, self.gateway_client, self.target_id, self.name)
         File 
"/home/jenkins/workspace/SparkPullRequestBuilder@2/python/pyspark/sql/utils.py",
 line 102, in deco
           raise converted
       AnalysisException: Negative scale is not allowed: -1. You can use 
spark.sql.legacy.allowNegativeScaleOfDecimal.enabled=true to enable legacy mode 
to allow it.;
   **********************************************************************
      1 of  16 in __main__._parse_datatype_json_string
   ***Test Failed*** 1 failures.
   ```

----------------------------------------------------------------
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


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