@joto requested changes on this pull request.
We need tests for this, I suggest in `tests/test-output-flex-types.cpp` . If
you can't run the tests locally, you'll see the results of the test run in your
branch on Github.
> @@ -45,6 +45,7 @@ std::vector<column_type_lookup> const COLUMN_TYPES = {
{"int8", table_column_type::int8},
{"bigint", table_column_type::int8},
{"real", table_column_type::real},
+ {"double", table_column_type::double_},
To avoid the awkward C++ name `double_`, maybe name it `double_precision`?
`double` is okay for the Lua side, I am only talking about the C++ side here.
> @@ -359,6 +359,16 @@ void flex_write_column(lua_State *lua_state,
> geometry_cache_t *geom_cache,
throw fmt_error("Invalid type '{}' for real column.",
lua_typename(lua_state, ltype));
}
+ } else if (column.type() == table_column_type::double_) {
Because this is just a copy of the code for the `real` type (except the one
place in the error message), I think we can do both in one if-condition with
"type=real or type=double" and change the error message to "...for real/double
column".
--
Reply to this email directly or view it on GitHub:
https://github.com/osm2pgsql-dev/osm2pgsql/pull/2488#pullrequestreview-4435103227
You are receiving this because you are subscribed to this thread.
Message ID: <osm2pgsql-dev/osm2pgsql/pull/2488/review/[email protected]>_______________________________________________
Tile-serving mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/tile-serving