question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Wrong (similar) field is returned

See original GitHub issue

Hadoop: 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:closed
  • Created 7 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
nezihyigitbasicommented, Mar 1, 2017

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 the browser_fullname column in the Parquet file. You can try setting hive.parquet.use-column-names=true to see whether it helps.

0reactions
ebuildycommented, Mar 21, 2017

Can you try with SET SESSION such as described https://prestodb.io/docs/current/sql/set-session.html ?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found