apache / drill

Apache Drill is a distributed MPP query layer for self describing data
https://drill.apache.org/
Apache License 2.0
1.93k stars 984 forks source link

"trim": does not work correctly on Postgresql #2832

Open ndn1991 opened 10 months ago

ndn1991 commented 10 months ago

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