Skip to content

Conversation

@sunng87
Copy link
Member

@sunng87 sunng87 commented Oct 25, 2025

Fixes #176

This patch is only for demo. By combining geodatafusion, we will have PostGIS experience or even compatibility in next future releases.

And I wish geodatafusion could provide an entrypoint API to install all UDFs to SessionContext.

@sunng87
Copy link
Member Author

sunng87 commented Oct 31, 2025

We can already include geodatafusion functions in datafusion-postgres. The next step is to check whether we can make the output format consistent with original postgis.

Original postgis, it's WKB in hex encoding without postgres' bytea hex encoding prefix (\x)

postgres=#  select ST_MakePoint(-71.104, 42.315);
                st_makepoint
--------------------------------------------
 01010000002DB29DEFA7C651C0B81E85EB51284540

Current geodatafusion+datafusion-postgres:

postgres=> select st_makepoint(37.23, 123.22);
 st_makepoint(Float64(37.23),Float64(123.22))
----------------------------------------------
 (37.23,123.22)

postgres=> select st_asbinary(st_makepoint(37.23, 123.22));
 st_asbinary(st_makepoint(Float64(37.23),Float64(123.22)))
-----------------------------------------------------------
 \x01010000003d0ad7a3709d4240ae47e17a14ce5e40

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

datafusion-geo integration

2 participants