BemiHQ / BemiDB

Postgres read replica optimized for analytics
https://bemidb.com
GNU Affero General Public License v3.0
1.1k stars 21 forks source link

Unsupported PostgreSQL type: point #10

Closed Xuquansheng closed 2 weeks ago

Xuquansheng commented 2 weeks ago

I imported data from https://postgrespro.com/community/demodb into pg 17. when i ran "bemidb --pg-database-url postgres://postgres:postgres@localhost:5432/demo sync", got panic: Unsupported PostgreSQL type: point, below is detailed info:

root@client1:~# bemidb --pg-database-url postgres://postgres:postgres@localhost:5432/demo sync 2024/11/14 19:38:47 [INFO] Syncing "public"."tickets"... 2024/11/14 19:40:21 [INFO] Syncing "public"."ticket_flights"... 2024/11/14 19:42:14 [INFO] Syncing "public"."seats"... 2024/11/14 19:42:14 [INFO] Syncing "public"."flights"... 2024/11/14 19:42:21 [INFO] Syncing "public"."boarding_passes"... 2024/11/14 19:43:53 [INFO] Syncing "public"."aircrafts_data"... 2024/11/14 19:43:53 [INFO] Syncing "public"."bookings"... 2024/11/14 19:44:19 [INFO] Syncing "public"."airports_data"... panic: Unsupported PostgreSQL type: point

goroutine 1 [running]: main.(PgSchemaColumn).parquetPrimitiveType(0xc000053608) /app/pg_schema_column.go:294 +0xcc main.(PgSchemaColumn).toParquetSchemaField(0xc000053608) /app/pg_schema_column.go:162 +0x45 main.PgSchemaColumn.ToParquetSchemaFieldMap({{0xc000823360, 0xb}, {0xc00082336b, 0x5}, {0xc000823370, 0x5}, {0xc000823376, 0x2}, {0x2a2caa6, 0x1}, ...}) /app/pg_schema_column.go:78 +0x2a main.(StorageBase).WriteParquetFile(0xc000070568, {0x2b8b278, 0xc003e12078}, {0xc000365408, 0x5, 0xc0000538b0?}, 0xc003e12060) /app/storage_base.go:32 +0x218 main.(StorageLocal).CreateParquet(0xc0003680d0, {0xc000048ab0, 0x27}, {0xc000365408, 0x5, 0x8}, 0xc003e12060) /app/storage_local.go:92 +0x276 main.(IcebergWriter).Write(0xc0000124c8, {{0xc00040a0a0?, 0xc00040a0a0?}, {0xc00040a0e0?, 0xc00040a0e0?}}, {0xc000365408, 0x5, 0x8}, 0xc003e12060) /app/iceberg_writer.go:338 +0x136 main.(Syncer).syncFromPgTable(0xc0000124f8, 0xc0003747e0, {{0xc00040a0a0?, 0x6?}, {0xc00040a0e0?, 0x0?}}) /app/syncer.go:108 +0x45c main.(*Syncer).SyncFromPostgres(0xc0000124f8) /app/syncer.go:46 +0x1e5

below is from pg

demo=# select airport_code,airport_name,coordinates from airports_data limit 5; airport_code | airport_name | coordinates --------------+------------------------------------------------------------+----------------------------------------- YKS | {"en": "Yakutsk Airport", "ru": "Якутск"} | (129.77099609375,62.093299865722656) MJZ | {"en": "Mirny Airport", "ru": "Мирный"} | (114.03900146484375,62.534698486328125) KHV | {"en": "Khabarovsk-Novy Airport", "ru": "Хабаровск-Новый"} | (135.18800354004,48.52799987793) PKC | {"en": "Yelizovo Airport", "ru": "Елизово"} | (158.45399475097656,53.16790008544922) UUS | {"en": "Yuzhno-Sakhalinsk Airport", "ru": "Хомутово"} | (142.71800231933594,46.88869857788086) (5 rows)

exAspArk commented 2 weeks ago

Hi @Xuquansheng — thanks for submitting this issue!

We've added basic support for geometric type by representing them as string for now. Would you be able to download the latest version and try again?

Xuquansheng commented 2 weeks ago

Thanks for your quick fixing, it's OK now.

发件人:exAspArk @.> 发送时间:2024年11月14日(星期四) 22:17 @.> @.>; @.> 主 题:Re: [BemiHQ/BemiDB] Unsupported PostgreSQL type: point (Issue #10) Hi @Xuquansheng <https://github.com/Xuquansheng > — thanks for submitting this issue! We've added basic support for geometric type by representing them as string for now. Would you be able to download <https://github.com/BemiHQ/BemiDB#quickstart > the latest version and try again? — Reply to this email directly, view it on GitHub <https://github.com/BemiHQ/BemiDB/issues/10#issuecomment-2476469901 >, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ATSISLCSJHSBMJNKI4AP63L2ASWJHAVCNFSM6AAAAABRYXSZQCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZWGQ3DSOJQGE >. You are receiving this because you were mentioned.Message ID: @.***>