[ https://issues.apache.org/jira/browse/DRILL-5278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15900958#comment-15900958 ]
Khurram Faraaz commented on DRILL-5278: --------------------------------------- This is by design, and works as expected. > CTTAS store.format=csv, returns one extra record > ------------------------------------------------ > > Key: DRILL-5278 > URL: https://issues.apache.org/jira/browse/DRILL-5278 > Project: Apache Drill > Issue Type: Bug > Components: Storage - Text & CSV > Affects Versions: 1.10.0 > Reporter: Khurram Faraaz > > When store.format = csv, we see incorrect results returned, an extra record > is returned, as compared to when store.format = parquet. The difference is > seen when doing a count over a temporary table created in Drill. > Drill 1.10.0 git commit ID : 300e9349 > Steps to reproduce the problem. > {noformat} > 0: jdbc:drill:schema=dfs.tmp> reset all; > +-------+---------------+ > | ok | summary | > +-------+---------------+ > | true | ALL updated. | > +-------+---------------+ > 1 row selected (0.279 seconds) > 0: jdbc:drill:schema=dfs.tmp> ALTER SESSION SET `store.format`='csv'; > +-------+------------------------+ > | ok | summary | > +-------+------------------------+ > | true | store.format updated. | > +-------+------------------------+ > 1 row selected (0.21 seconds) > 0: jdbc:drill:schema=dfs.tmp> CREATE TEMPORARY TABLE dfs.tmp.temp_tbl > . . . . . . . . . . . . . . > AS > . . . . . . . . . . . . . . > SELECT * FROM typeall_l; > +-----------+----------------------------+ > | Fragment | Number of records written | > +-----------+----------------------------+ > | 0_0 | 105 | > +-----------+----------------------------+ > 1 row selected (0.233 seconds) > 0: jdbc:drill:schema=dfs.tmp> SELECT COUNT(*) FROM dfs.tmp.temp_tbl; > +---------+ > | EXPR$0 | > +---------+ > | 106 | > +---------+ > 1 row selected (0.189 seconds) > 0: jdbc:drill:schema=dfs.tmp> drop table dfs.tmp.temp_tbl; > +-------+-------------------------------------+ > | ok | summary | > +-------+-------------------------------------+ > | true | Temporary table [temp_tbl] dropped | > +-------+-------------------------------------+ > 1 row selected (0.186 seconds) > 0: jdbc:drill:schema=dfs.tmp> ALTER SESSION SET `store.format`='parquet'; > +-------+------------------------+ > | ok | summary | > +-------+------------------------+ > | true | store.format updated. | > +-------+------------------------+ > 1 row selected (0.196 seconds) > 0: jdbc:drill:schema=dfs.tmp> CREATE TEMPORARY TABLE dfs.tmp.temp_tbl > . . . . . . . . . . . . . . > AS > . . . . . . . . . . . . . . > SELECT * FROM typeall_l; > +-----------+----------------------------+ > | Fragment | Number of records written | > +-----------+----------------------------+ > | 0_0 | 105 | > +-----------+----------------------------+ > 1 row selected (0.263 seconds) > 0: jdbc:drill:schema=dfs.tmp> SELECT COUNT(*) FROM dfs.tmp.temp_tbl; > +---------+ > | EXPR$0 | > +---------+ > | 105 | > +---------+ > 1 row selected (0.169 seconds) > 0: jdbc:drill:schema=dfs.tmp> drop table dfs.tmp.temp_tbl; > +-------+-------------------------------------+ > | ok | summary | > +-------+-------------------------------------+ > | true | Temporary table [temp_tbl] dropped | > +-------+-------------------------------------+ > 1 row selected (0.165 seconds) > 0: jdbc:drill:schema=dfs.tmp> > {noformat} -- This message was sent by Atlassian JIRA (v6.3.15#6346)