dalelane commented on code in PR #28740:
URL: https://github.com/apache/flink/pull/28740#discussion_r3645125498


##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/data/binary/BinaryGeographyData.java:
##########
@@ -0,0 +1,269 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.data.binary;
+
+import org.apache.flink.annotation.Internal;
+import org.apache.flink.core.memory.MemorySegment;
+import org.apache.flink.core.memory.MemorySegmentFactory;
+import org.apache.flink.table.api.TableRuntimeException;
+import org.apache.flink.table.data.GeographyData;
+
+import java.util.Arrays;
+
+/**
+ * A binary implementation of {@link GeographyData} backed by raw ISO WKB 
bytes.
+ *
+ * <p>GEOGRAPHY uses OGC:CRS84 by contract, but ISO WKB does not encode CRS or 
SRID metadata. This
+ * container stores the raw ISO WKB payload only; CRS validation, CRS 
transformation, and EWKB/SRID
+ * handling belong to constructors, functions, and connector schema mapping.
+ */
+@Internal
+public final class BinaryGeographyData extends BinarySection implements 
GeographyData {

Review Comment:
   BinaryGeographyData inherits a hashCode() method by extending BinarySection, 
so hashing will be based on the binary representation of the geography. 
   
   Will geographies that are semantically equal serialize to identical bytes? 
(e.g. same geometry encoded as big-endian vs little-endian - they would hash 
differently right? ) 
   
   Is the assumption that users need to normalize to some canonical byte order 
up-front so comparisons in Flink work as expected? 
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to