apache / apache/pinot

Class TextTable from the java-client project doesn't hold column data types metadata

Open
#7,671 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
6.1k
Forks
1.5k
Avg merge
1d 21h
Merged PRs (30d)
189

Description

I was writing a scala client taking this project as a basement but I found something strange that later @xiangfu0 confirmed it as a bug.

Let's start here: https://github.com/apache/pinot/blob/5becf5b81c996a6be39a22fd99aacfa7f1b3e1ac/pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/ResultTableResultSet.java#L113

In that method there are 2 instructions in lines 122 and 123 putting column names and column data types in a TextTable's object but when going into that class I found out there is no way this table can hold both headers as you can see here:
https://github.com/apache/pinot/blob/5becf5b81c996a6be39a22fd99aacfa7f1b3e1ac/pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/ResultTableResultSet.java#L122
https://github.com/apache/pinot/blob/5becf5b81c996a6be39a22fd99aacfa7f1b3e1ac/pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/ResultTableResultSet.java#L123
https://github.com/apache/pinot/blob/5becf5b81c996a6be39a22fd99aacfa7f1b3e1ac/pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/TextTable.java#L38

Let me know if I can do something to help.

Best regards,
Alexander

Contributor guide

Open the contributing guide

Research direction

Start in pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/ResultTableResultSet.java at the referenced lines, then inspect TextTable.java and how its headers are stored. Confirm how column names and data types are passed and retained; done means a TextTable can preserve both pieces of column metadata for the Java client result.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.