twosigma / flint

A Time Series Library for Apache Spark
Apache License 2.0
995 stars 184 forks source link

[Python] Better argument checking #7

Open icexelloss opened 7 years ago

icexelloss commented 7 years ago

Flint python API does't check argument types currently, this leads to bad user experience.

For instance, summarizer.linearRegression takes a arg "xcols" as a list of string, if user pass a string, it throws a confusing exception:

Py4JError: An error occurred while calling z:com.twosigma.huohua.timeseries.summarize.Summary.linearRegression. Trace:
py4j.Py4JException: Method linearRegression([class java.lang.String, class java.lang.String, class java.lang.String, class java.lang.Boolean]) does not exist