spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amit (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SPARK-25185) CBO rowcount statistics doesn't work for partitioned parquet external table
Date Wed, 22 Aug 2018 05:05:00 GMT
Amit created SPARK-25185:
----------------------------

             Summary: CBO rowcount statistics doesn't work for partitioned parquet external
table
                 Key: SPARK-25185
                 URL: https://issues.apache.org/jira/browse/SPARK-25185
             Project: Spark
          Issue Type: Sub-task
          Components: Spark Core, SQL
    Affects Versions: 2.3.0, 2.2.1
         Environment: Created a dummy partitioned data with partition column on string type
col1=a and col1=b

added csv data-> read through spark -> created partitioned external table-> msck
repair table to load partition. Did analyze on all columns and partition column as well.

~println(spark.sql("select * from test_p where e='1a'").queryExecution.toStringWithStats)~
~val op = spark.sql("select * from test_p where e='1a'").queryExecution.optimizedPlan~

// e is the partitioned column
~val stat = op.stats(spark.sessionState.conf)~
~print(stat.rowCount)~

 

Created the same way in parquet the rowcount comes up correctly in case of csv but in parquet
it shows as None.

 
            Reporter: Amit






--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org


Mime
View raw message