Wrong (similar) field is returned
See original GitHub issueHadoop: 2.6 PrestoDB: Presto CLI 0.148 Connector: Hive (Hive 1.2)
I have a Parquet Hive table, with 20 fields:
- fullname
- browser_fullname
- …
Running the query SELECT COUNT(*), fullname FROM sample2 GROUP BY fullname;
gives browser_fullname
field instead of fullname
.
Tested with Hive on Tez and Apache Drill, it’s ok:
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
How to correct a #N/A error in the VLOOKUP function
Consider using INDEX/MATCH instead · With INDEX and MATCH, the return value need not be in the same column as the lookup column....
Read more >HnD | Wrong field returned, Page 1 - LLBLGen Pro
Hello,. Running this query on Northwind ProductId has the value of CategoryId. Based on the results of my business code it looks like...
Read more >Calculated Field Returning Incorrect Results Sometimes ...
A calculated field is returning incorrect results. For example, a field with the formula: [Profit]/[Sales]. is not returning the expected ...
Read more >ADO on Access Lookup field, getting wrong field returned
Using the same SQL as one of the queries in the database (copied from the Access query and pasted into Excel VBA), I...
Read more >LOOKUP() - AppSheet Help
It returns only a single column value, even if several rows match. ... Equivalent to ANY(SELECT(Restaurants[Phone], ([Name] = "Bob's Burgers"))) .
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I suspect there is some sort of schema mismatch here, you should compare the Hive schema vs. the Parquet file level schema to confirm that.
BTW by default Presto uses index-based access when reading columns from Parquet files, and probably the Hive column index for the
fullname
column points to thebrowser_fullname
column in the Parquet file. You can try settinghive.parquet.use-column-names=true
to see whether it helps.Can you try with
SET SESSION
such as described https://prestodb.io/docs/current/sql/set-session.html ?