0
votes

I am trying to run Presto with Hive (all version details below) on CDH 5.14.2 Surprisingly, I get 0 records as output when I run any select query on any table. When I do select * on any table, I just get list of all fields, again no data. All the tables are external hive tables with data in parquet format

  • Hive 1.1.0

  • Presto 0.223, also 0.219

Check the server.log file in Presto installation, no ERROR or WARN messages there

Also tried this same installation with Presto 0.219, same case

presto:sample_db> select count(*) from tableName;

_col0
-------
     0
(1 row)

Query 20190925_125900_00005_8tzp2, FINISHED, 1 node
Splits: 18 total, 18 done (100.00%)
0:01 [0 rows, 0B] [0 rows/s, 0B/s]

Output of DESCRIBE FORMATTED tablename --

# col_name              data_type               comment

column1             string
column2             string
column3             string
column4             decimal(6,0)
column5             timestamp

# Partition Information
# col_name              data_type               comment

active                  string

# Detailed Table Information
Database:               db_name
Owner:                  cloudera-vivek
CreateTime:             Sun Nov 25 03:23:06 GMT 2018
LastAccessTime:         UNKNOWN
Protect Mode:           None
Retention:              0
Location:               dtap://dbname/tablename
Table Type:             EXTERNAL_TABLE
Table Parameters:
        EXTERNAL                TRUE
        STATS_GENERATED_VIA_STATS_TASK  true
        numPartitions           2
        numRows                 4142
        transient_lastDdlTime   1543116186

# Storage Information
SerDe Library:          org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe
InputFormat:            org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat
OutputFormat:           org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat
Compressed:             No
Num Buckets:            -1
Bucket Columns:         []
Sort Columns:           []
Storage Desc Params:
        serialization.format    1
Time taken: 0.919 seconds, Fetched: 40 row(s)

Could this be because of some version mismatch between Hive and Presto? I couldn't find anything like this in Presto release notes Any other .jar or config files which needs to be added while setup?

Very much appreciate your help

1
check the field delimiters and line terminators, they should be specified in create tablemangusta
I have checked SHOW CREATE TABLE <tablename> and also DESCRIBE EXTENDED <tablename> it doesn't show field.delim anywhere. Am assuming row format delimited fields terminated by wasn't specified while creating table (as it wasn't created by me)user2861696

1 Answers

0
votes

Can you try the msck repair table table-name as mentioned here: https://github.com/prestodb/presto/issues/4109 ?