fix date-time format error#157
Conversation
|
wait a moment something is off... when i do the rest client emits a call (which it wasn't before) but the param it emits is: but i need the rest client to emit something like: which i believe is RFC 3339, section 5.6 conforming |
|
The issue is more complex. The implementation of OpenApiClient::getFilter is not correct for complex types, like timestamps. I'm not super familiar with type coercion that Trino does for predicates, so I'm not sure where the type information comes from for the domain values. I'd assume Trino coerces these values to the correct column type. We should use the column's type, not only the source type (Schema object from the spec), to correctly encode the value. This would be the reverse of https://github.com/nineinchnick/trino-openapi/blob/main/src/main/java/pl/net/was/JsonTrinoConverter.java#L254, which also doesn't cover all timestamp types. I haven't done it yet, since it's quite a lot of work to cover all timestamp types supported in Trino, including edge cases for weird timezones. We can write a bunch of unit tests, covering the same cases as in https://github.com/trinodb/trino/blob/master/plugin/trino-postgresql/src/test/java/io/trino/plugin/postgresql/TestPostgreSqlTypeMapping.java#L1399 I'm not asking you to do all of this, just dumping what I remember here. We should create an issue for this, and start hacking at it incrementally. |
|
I created an issue for this #161 |
when a spec file has an input parameter like:
and you need to
without this PR you'll get:
with a trace like this:
but this PR allows this: