TASK 4: add planner validation for unsupported conversions#6
TASK 4: add planner validation for unsupported conversions#6gkalashyan-akv wants to merge 4 commits into
Conversation
0b5a608 to
0bbf9cd
Compare
| } | ||
|
|
||
| @Override | ||
| public void serialize(GeographyData record, DataOutputView target) throws IOException { |
There was a problem hiding this comment.
Could we clarify the intended versioning contract for GeographyDataSerializer? The FLIP describes the Flink state/shuffle serializer format as version byte + length + ISO WKB payload, while this implementation writes length + payload only. I understand Flink serializers can also evolve through TypeSerializerSnapshot, and existing serializers such as Bitmap/Variant do not necessarily put a version byte into every value. It would be good to either align this serializer with the FLIP or explicitly update the design to say that format evolution is handled only through the serializer snapshot. The Parquet/Iceberg payload should of course remain raw WKB without any Flink prefix.
https://docs.google.com/document/d/1rpOTETT_Ui3TlEGioUr2NKJ1p1dlxjJQudXHndxBpO0/edit?tab=t.0
On-disk format: one-byte version header 0x01, followed by 4-byte big-endian length, followed by the ISO WKB payload.
There was a problem hiding this comment.
Good catch. This PR still uses the older internal serializer shape, but the mismatch is already fixed in the TASK 6 follow-up branch (task/users-and-connectors-need-portable-output-formats): the internal GEOGRAPHY serializer now uses version byte + length + ISO WKB payload, with tests covering the versioned envelope and unsupported-version handling. External connector/file payloads such as Parquet/Iceberg remain raw WKB without any Flink prefix.
| } | ||
| } | ||
|
|
||
| private static int readSubtypeId(MemorySegment[] segments, int offset, int sizeInBytes) { |
There was a problem hiding this comment.
Could we clarify the validation boundary for BinaryGeographyData? Right now constructing the binary wrapper fully walks the WKB payload via validateGeometry(), and this path is also used by BinaryRowData.getGeography(). My reading of the FLIP is that runtime/pass-through paths should keep GEOGRAPHY as raw ISO WKB and only support cheap header inspection, while full validation belongs to constructors such as ST_GEOGFROMWKB or connector ingestion. If the intended invariant is that every GeographyData instance is fully validated, could we document that trade-off and add a test/performance rationale?
BinaryGeographyData fully walks and validates the WKB structure on construction/read, including BinaryRowData.getGeography(). Proposal says runtime/pass-through paths should store raw ISO WKB and not decode; cheap header inspection only. This may add repeated O(n) validation on normal row access and connector pass-through.
0bbf9cd to
2bfd5fe
Compare
c7d3852 to
8800f00
Compare
Runtime representation and serializer Cover geography serializer with SerializerTestBase
8800f00 to
1505ab4
Compare
What is the purpose of the change
(For example: This pull request makes task deployment go through the blob server, rather than through RPC. That way we avoid re-transferring them on each deployment (during recovery).)
Brief change log
(for example:)
Verifying this change
Please make sure both new and modified tests in this PR follow the conventions for tests defined in our code quality guide.
(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)
Does this pull request potentially affect one of the following parts:
@Public(Evolving): (yes / no)Documentation
Was generative AI tooling used to co-author this PR?