[jira] [Commented] (SPARK-15193) samplingRatio should default to 1.0 across the board
[ https://issues.apache.org/jira/browse/SPARK-15193?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15278393#comment-15278393 ] Nicholas Chammas commented on SPARK-15193: -- Nope, a sampling ratio of 1.0 and None mean [different things|http://spark.apache.org/docs/1.6.1/api/python/pyspark.sql.html#pyspark.sql.SQLContext.createDataFrame]: {quote} If schema inference is needed, samplingRatio is used to determined the ratio of rows used for schema inference. The first row will be used if samplingRatio is None. {quote} createDataFrame() is not consistent with jsonRDD() as of 1.6.1. Looking in master, I can't seem to find jsonRDD() for Python anymore, so perhaps that got removed. So actually, it looks like the default _did_ get standardized, but to None. :/ > samplingRatio should default to 1.0 across the board > > > Key: SPARK-15193 > URL: https://issues.apache.org/jira/browse/SPARK-15193 > Project: Spark > Issue Type: Improvement > Components: PySpark, SQL >Reporter: Nicholas Chammas >Priority: Minor > > The default sampling ratio for {{jsonRDD}} is > [1.0|http://spark.apache.org/docs/1.6.1/api/python/pyspark.sql.html#pyspark.sql.SQLContext.jsonRDD], > whereas for {{createDataFrame}} it's > [{{None}}|http://spark.apache.org/docs/1.6.1/api/python/pyspark.sql.html#pyspark.sql.SQLContext.createDataFrame]. > I think the default sampling ratio should be 1.0 across the board. Users > should have to explicitly supply a lower sampling ratio if they know their > dataset has a consistent structure. Otherwise, I think the "safer" thing to > default to is to check all the data. > Targeting this for 2.0 in case we consider it a breaking change that would be > more difficult to get in later. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Commented] (SPARK-15193) samplingRatio should default to 1.0 across the board
[ https://issues.apache.org/jira/browse/SPARK-15193?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15278274#comment-15278274 ] Sean Owen commented on SPARK-15193: --- Pardon my ignorance but are those not the same thing semantically? you're just saying they should be expressed the same way? I no longer see any Python API with samplingRatio=1.0 so is it already consistent? > samplingRatio should default to 1.0 across the board > > > Key: SPARK-15193 > URL: https://issues.apache.org/jira/browse/SPARK-15193 > Project: Spark > Issue Type: Improvement > Components: PySpark, SQL >Reporter: Nicholas Chammas >Priority: Minor > > The default sampling ratio for {{jsonRDD}} is > [1.0|http://spark.apache.org/docs/1.6.1/api/python/pyspark.sql.html#pyspark.sql.SQLContext.jsonRDD], > whereas for {{createDataFrame}} it's > [{{None}}|http://spark.apache.org/docs/1.6.1/api/python/pyspark.sql.html#pyspark.sql.SQLContext.createDataFrame]. > I think the default sampling ratio should be 1.0 across the board. Users > should have to explicitly supply a lower sampling ratio if they know their > dataset has a consistent structure. Otherwise, I think the "safer" thing to > default to is to check all the data. > Targeting this for 2.0 in case we consider it a breaking change that would be > more difficult to get in later. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Commented] (SPARK-15193) samplingRatio should default to 1.0 across the board
[ https://issues.apache.org/jira/browse/SPARK-15193?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15274783#comment-15274783 ] Nicholas Chammas commented on SPARK-15193: -- [~yhuai] - What do you think of this proposed change? > samplingRatio should default to 1.0 across the board > > > Key: SPARK-15193 > URL: https://issues.apache.org/jira/browse/SPARK-15193 > Project: Spark > Issue Type: Improvement > Components: PySpark, SQL >Reporter: Nicholas Chammas >Priority: Minor > > The default sampling ratio for {{jsonRDD}} is > [1.0|http://spark.apache.org/docs/1.6.1/api/python/pyspark.sql.html#pyspark.sql.SQLContext.jsonRDD], > whereas for {{createDataFrame}} it's > [{{None}}|http://spark.apache.org/docs/1.6.1/api/python/pyspark.sql.html#pyspark.sql.SQLContext.createDataFrame]. > I think the default sampling ratio should be 1.0 across the board. Users > should have to explicitly supply a lower sampling ratio if they know their > dataset has a consistent structure. Otherwise, I think the "safer" thing to > default to is to check all the data. > Targeting this for 2.0 in case we consider it a breaking change that would be > more difficult to get in later. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org