You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Postgres Protocol Plugin does not return schema for empty query results #3971
Hi,
I have been trying to connect to locally deployed arcade db with pyspark using postgres JDBC driver and faced an interesting problem. While executing simple queries (e.g. SELECT id FROM table on a non-empty table with valid column id), I would get empty results. However, when checking the count of the dataframe loaded by pyspark, it returns a correct number of rows in the table. Showing the dataframe content displays N empty rows.
I have researched this for a while, and figured out that spark queries the database by adding WHERE 1=0 to the query to retrieve data schema. On regular postgres database, this does not return any rows, but the schema is returned. For example:
Activity
robfrank commentedon Apr 23, 2026
I faced this problem in the past (like 10 years ago), same old story: To obtain the schema spark/pyspark perform a first query and caches the schema.
We can work on compatibility with spark/pyspark.
I take this issue.
chore(deps): bump org.postgresql:postgresql from 42.7.10 to 42.7.11 […
#3971 fix(postgres): return RowDescription with schema columns for em…
ArcadeData#3971 fix(postgres): return RowDescription with schema colu…
#3971 fix(postgres): return RowDescription with schema columns for em…
chore(deps): bump org.postgresql:postgresql from 42.7.10 to 42.7.11 […
ArcadeData#3971 fix(postgres): return RowDescription with schema colu…