apache / apache/pinot

Servers return wrong column types in case of empty results (everything defaults to STRING)

Open
#6,962 1 comment 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

**Non-empty results (correct types):**
![image](https://user-images.githubusercontent.com/8548220/119394222-cadc3200-bc86-11eb-9281-4dc84ae525cc.png)

**Empty results (incorrect types):**
![image](https://user-images.githubusercontent.com/8548220/119394045-98cad000-bc86-11eb-9259-081ad71f23d8.png)

This part of the code needs to be changed:
https://github.com/apache/incubator-pinot/blob/master/pinot-core/src/main/java/org/apache/pinot/core/common/datatable/DataTableUtils.java#L121

Contributor guide

Open the contributing guide

Research direction

Start by reading pinot-core/src/main/java/org/apache/pinot/core/common/datatable/DataTableUtils.java around line 121 and compare how column types are determined for empty and non-empty results. Reproduce an empty-result query, then verify that its returned column types match the corresponding non-empty result types.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.