Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

"trim": does not work correctly on Postgresql

Open
#2,832 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java, postgresql, sql
Domain
databases

Research direction

Reproduce SELECT TRIM(' ') against PostgreSQL 14.6 through Drill 1.21.1, then compare the result with Drill 1.19.0. Trace the TRIM expression and JDBC/PostgreSQL result handling; done means the query returns an empty string rather than null for the single-row case.

Written by the indexing model from the issue text.

Description

bug

Drill 1.21.1
Postgresql 14.6

DrillBit storage configuration:

{
  "type": "jdbc",
  "driver": "org.postgresql.Driver",
  "url": "jdbc:postgresql://<host>/<db_name>",
  "username": "<username>",
  "password": "<password>",
  "authMode": "SHARED_USER",
  "writerBatchSize": 10000,
  "enabled": true
}

Run this query
SELECT TRIM( ' ') AS x FROM path_to_any_table
Asume that the table has only one row.
The actual result:
x

null

The expected result
x

x should be an empty string.
The issue doesn't happen in Drill 1.19.0

Dominant language
Java
Stars
2k
Forks
989
Avg merge
1d 14h
Merged PRs (30d)
4

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/drill

All issues in apache/drill

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.