fix(cql2): CQL2 Core conformance fixes#153
Open
constantinius wants to merge 1 commit into
Open
Conversation
- Allow single-character property names in CQL2 Text grammar by changing the attribute regex from /[a-zA-Z][a-zA-Z_:0-9.]+/ to /[a-zA-Z][a-zA-Z_:0-9.]*/ (+ to *). The spec requires identifiers to be at least one character, not two. - Fix CQL2 JSON encoder date/datetime serialization. The previous dead-code @handle(datetime) with wrong node annotation was overshadowed by the literal handler. Reorder handlers so date and datetime handlers come AFTER the generic literal handler so the metaclass registry correctly maps them. Date values are now serialized as {"date": "YYYY-MM-DD"} and datetime values as {"timestamp": "...Z"} with Z suffix instead of +00:00. - Remove debug print() calls from wkt.py (geometry_with_srid and multipoint_2 handlers). - Add regression tests: single-char attribute parsing, date/datetime round-trip through JSON parser and encoder.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Align the CQL2 Core conformance class with the OGC 21-065r2 spec.
Changes
+→*){"date": "..."},{"timestamp": "...Z"}) instead of bare strings. The existing@handle(datetime)was dead code (overridden byliteralhandler via metaclass ordering). Added proper handlers afterliteralso they take priority.Zsuffix per spec, not+00:00print()statements inwkt.pySpec reference
OGC 21-065r2 §6.3.1