Skip to content

SQL Federation (PostgreSQL): SELECT version() got Exception when ALL_QUERY_USE_SQL_FEDERATION=true #37436

@duerwuyi

Description

@duerwuyi

Feature needed (bug report)

Which version of ShardingSphere did you use?

shardingsphere-proxy 5.5.2
postgres 17.2 as backend

Expected behavior

select version(); should return the string of PG version, like:

testdb=> select version();
                                                      version                                                       
--------------------------------------------------------------------------------------------------------------------
 PostgreSQL 17.6 (Debian 17.6-2.pgdg13+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 14.2.0-19) 14.2.0, 64-bit

Actual behavior

The following query fails with:
ERROR: SQL federation does not support SQL 'select version();'.

testdb=> select version();
ERROR:  SQL federation does not support SQL 'select version();'.
More details: org.apache.calcite.runtime.CalciteContextException: At line 0, column 0: No match found for function signature version()

Though we knew that federation is an experimental feature, common PG functions like select version() could better be supported.

Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.

ss_postgres.zip

run docker compose up -d in this file.

SQL to execute are shown above

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions