mihaibudiu commented on code in PR #5427:
URL: https://github.com/apache/calcite/pull/5427#discussion_r4673842135


##########
core/src/main/java/org/apache/calcite/adapter/enumerable/RexToLixTranslator.java:
##########
@@ -1619,7 +1649,29 @@ private ConstantExpression 
getTypedNullLiteral(RexLiteral literal) {
     if (cached != null) {
       return cached;
     }
+    if ((SqlKind.COMPARISON.contains(call.getKind()) || call.getKind() == 
SqlKind.SEARCH
+        || call.getKind() == SqlKind.IS_DISTINCT_FROM
+        || call.getKind() == SqlKind.IS_NOT_DISTINCT_FROM)
+        && call.getOperands().stream()
+            .anyMatch(operand -> 
SqlTypeUtil.containsGeography(operand.getType()))) {
+      throw new UnsupportedOperationException("Local GEOGRAPHY comparison is 
not supported");
+    }
     final SqlOperator operator = call.getOperator();
+    if (COLLECTION_EQUALITY_OPERATORS.contains(operator)
+        && call.getOperands().stream()
+            .anyMatch(operand -> 
SqlTypeUtil.containsGeography(operand.getType()))) {
+      throw new UnsupportedOperationException(
+          "Local " + operator.getName() + " on collections containing 
GEOGRAPHY "

Review Comment:
   is this also temporary?



##########
core/src/main/codegen/templates/Parser.jj:
##########
@@ -7008,21 +6991,40 @@ SqlTypeNameSpec RowTypeName() :
 
 SqlTypeNameSpec MapTypeName() :
 {
-    SqlDataTypeSpec keyType = null;
-    SqlDataTypeSpec valType = null;
+    final SqlDataTypeSpec keyType;

Review Comment:
   how is this related to GEOGRAPHY?
   This should be a separate issue.



##########
build.gradle.kts:
##########
@@ -213,6 +213,9 @@ reporting {
 val javadocAggregate by tasks.registering(Javadoc::class) {
     group = JavaBasePlugin.DOCUMENTATION_GROUP
     description = "Generates aggregate javadoc for all the artifacts"
+    dependsOn(subprojects.map { project ->

Review Comment:
   what are these for?



##########
core/src/main/java/org/apache/calcite/adapter/enumerable/EnumUtils.java:
##########
@@ -100,6 +103,18 @@
  * style.
  */
 public class EnumUtils {
+  /** Checks join keys before generating Java equality, hashing, or ordering. 
*/
+  static void checkGeographyJoinKeys(Join join) {
+    final JoinInfo info = join.analyzeCondition();
+    if (info.leftKeys.stream().anyMatch(i ->
+        
SqlTypeUtil.containsGeography(join.getLeft().getRowType().getFieldList().get(i).getType()))

Review Comment:
   is this a temporary restriction, or will it always be here?



##########
site/_docs/spatial.md:
##########
@@ -69,6 +69,75 @@ SELECT ST_PointFromText('POINT(-71.064544 42.28787)');
 1 row selected (0.323 seconds)
 {% endhighlight %}
 
+## GEOGRAPHY type
+
+The spatial function library provides two structural accessors for

Review Comment:
   I expect this list will become longer, write the docs as if that will be the 
case



##########
site/_docs/spatial.md:
##########
@@ -69,6 +69,75 @@ SELECT ST_PointFromText('POINT(-71.064544 42.28787)');
 1 row selected (0.323 seconds)
 {% endhighlight %}
 
+## GEOGRAPHY type
+
+The spatial function library provides two structural accessors for
+[`GEOGRAPHY`](reference.html#geography).
+
+| Signature | Result |
+| --- | --- |
+| `ST_IsEmpty(GEOGRAPHY)` → `BOOLEAN` | Returns true if the value is empty. A 
collection is empty if all its members are empty. |
+| `ST_GeometryType(GEOGRAPHY)` → `VARCHAR` | Returns the value's shape name, 
including for an empty value. |
+
+The shape names are `POINT`, `LINESTRING`, `POLYGON`, `MULTIPOINT`,
+`MULTILINESTRING`, `MULTIPOLYGON`, and `GEOMETRYCOLLECTION`.
+Both accessors return SQL NULL for a SQL NULL argument and a non-NULL
+result for an empty value. The result type is nullable when the argument
+type is nullable. The accessors leave the coordinates unchanged.
+
+For local execution, a table can implement
+[`GeographyTable`]({{ site.apiRoot 
}}/org/apache/calcite/schema/GeographyTable.html)
+and supply
+[`GeographyValue`]({{ site.apiRoot 
}}/org/apache/calcite/runtime/GeographyValue.html)
+objects backed by JTS. The accessors use the same shape names and emptiness
+rules as the corresponding `GEOMETRY` overloads. Measurement functions such
+as `ST_Area` accept geometry arguments. SQL WKT and WKB conversion
+functions operate on geometry.
+
+Adapters supply valid geography values. The wrapper and accessors do not

Review Comment:
   I thought in SQL all values are immutable. 
   What is this talking about?



##########
site/_docs/spatial.md:
##########
@@ -69,6 +69,75 @@ SELECT ST_PointFromText('POINT(-71.064544 42.28787)');
 1 row selected (0.323 seconds)
 {% endhighlight %}
 
+## GEOGRAPHY type
+
+The spatial function library provides two structural accessors for
+[`GEOGRAPHY`](reference.html#geography).
+
+| Signature | Result |
+| --- | --- |
+| `ST_IsEmpty(GEOGRAPHY)` → `BOOLEAN` | Returns true if the value is empty. A 
collection is empty if all its members are empty. |
+| `ST_GeometryType(GEOGRAPHY)` → `VARCHAR` | Returns the value's shape name, 
including for an empty value. |
+
+The shape names are `POINT`, `LINESTRING`, `POLYGON`, `MULTIPOINT`,
+`MULTILINESTRING`, `MULTIPOLYGON`, and `GEOMETRYCOLLECTION`.
+Both accessors return SQL NULL for a SQL NULL argument and a non-NULL
+result for an empty value. The result type is nullable when the argument
+type is nullable. The accessors leave the coordinates unchanged.

Review Comment:
   I am not sure how an accessor can change the coordinates



##########
site/_docs/reference.md:
##########
@@ -1464,11 +1412,53 @@ Note:
   it will rely on the supplied time zone to provide correct semantics.
 * GEOMETRY is allowed only in certain
   [conformance levels]({{ site.apiRoot 
}}/org/apache/calcite/sql/validate/SqlConformance.html#allowGeometry--).
+* GEOGRAPHY is available in `BABEL` and `LENIENT` conformance.
+  See [GEOGRAPHY](#geography) for the type and execution rules.
 * Interval literals may only use time units
   YEAR, QUARTER, MONTH, WEEK, DAY, HOUR, MINUTE and SECOND. In certain
   [conformance levels]({{ site.apiRoot 
}}/org/apache/calcite/sql/validate/SqlConformance.html#allowPluralTimeUnits--),
   we also allow their plurals, YEARS, QUARTERS, MONTHS, WEEKS, DAYS, HOURS, 
MINUTES and SECONDS.
 
+### GEOGRAPHY
+
+Use `GEOGRAPHY` as a type name with
+[conformance that enables it]({{ site.apiRoot 
}}/org/apache/calcite/sql/validate/SqlConformance.html#allowGeography()).
+It is a non-reserved keyword. Column names and aliases may use the word
+`geography` under default conformance as well.
+
+`CAST(NULL AS GEOGRAPHY)` produces a nullable `GEOGRAPHY` value.
+The type name takes no parameters, and SQL has no non-NULL geography literal
+syntax. Casts between geography and the same type are valid. Casts between
+geography and concrete geometry, character, or binary types are rejected in
+both directions. These concrete cast rules apply inside supported collection
+and row types as well.
+
+`CASE`, `COALESCE`, and `UNION ALL` preserve `GEOGRAPHY` when their
+concrete inputs are geography and their remaining inputs are NULL.
+Nullability follows the corresponding expression or set operation.
+Geography can be an element of an `ARRAY` or `MULTISET`, a `MAP` value,
+or a `ROW` field. A nested geography leaf retains its type and nullability.
+
+Equality between two geography expressions can be validated. Ordinary equality

Review Comment:
   what does "can be validated" mean?
   I assume it means "is accepted by the validator but currently is 
unimplemented".
   



##########
site/_docs/reference.md:
##########
@@ -1464,11 +1412,53 @@ Note:
   it will rely on the supplied time zone to provide correct semantics.
 * GEOMETRY is allowed only in certain
   [conformance levels]({{ site.apiRoot 
}}/org/apache/calcite/sql/validate/SqlConformance.html#allowGeometry--).
+* GEOGRAPHY is available in `BABEL` and `LENIENT` conformance.
+  See [GEOGRAPHY](#geography) for the type and execution rules.
 * Interval literals may only use time units
   YEAR, QUARTER, MONTH, WEEK, DAY, HOUR, MINUTE and SECOND. In certain
   [conformance levels]({{ site.apiRoot 
}}/org/apache/calcite/sql/validate/SqlConformance.html#allowPluralTimeUnits--),
   we also allow their plurals, YEARS, QUARTERS, MONTHS, WEEKS, DAYS, HOURS, 
MINUTES and SECONDS.
 
+### GEOGRAPHY
+
+Use `GEOGRAPHY` as a type name with
+[conformance that enables it]({{ site.apiRoot 
}}/org/apache/calcite/sql/validate/SqlConformance.html#allowGeography()).
+It is a non-reserved keyword. Column names and aliases may use the word
+`geography` under default conformance as well.
+
+`CAST(NULL AS GEOGRAPHY)` produces a nullable `GEOGRAPHY` value.
+The type name takes no parameters, and SQL has no non-NULL geography literal
+syntax. Casts between geography and the same type are valid. Casts between
+geography and concrete geometry, character, or binary types are rejected in
+both directions. These concrete cast rules apply inside supported collection
+and row types as well.
+
+`CASE`, `COALESCE`, and `UNION ALL` preserve `GEOGRAPHY` when their
+concrete inputs are geography and their remaining inputs are NULL.
+Nullability follows the corresponding expression or set operation.
+Geography can be an element of an `ARRAY` or `MULTISET`, a `MAP` value,
+or a `ROW` field. A nested geography leaf retains its type and nullability.
+
+Equality between two geography expressions can be validated. Ordinary equality
+produces nullable `BOOLEAN` when an operand is nullable, while
+`IS [NOT] DISTINCT FROM` produces non-nullable `BOOLEAN`. Calcite's local
+execution rejects geography equality and equality-dependent collection
+operations. Ordering operators and ordering keys reject geography, including
+nested geography leaves. Geography is also rejected as a key for `DISTINCT`,
+`GROUP BY`, deduplicating set operations, window partitioning, and `MAP` keys.
+
+The local engine can return a typed NULL and run the
+[structural geography accessors](spatial.html#geography-type) on values
+supplied by a geography-aware table. Non-NULL SQL literals and non-NULL
+default values are unsupported.
+`GEOGRAPHY` has its own type identity and uses the JDBC type code 
`Types.OTHER`.

Review Comment:
   this seems an implementation detail, it should not be here.



##########
core/src/main/java/org/apache/calcite/rel/type/RelDataTypeFactoryImpl.java:
##########
@@ -216,24 +216,28 @@ private RelDataType createStructType(
 
   protected @Nullable RelDataType leastRestrictiveStructuredType(
       final List<RelDataType> types) {
-    final RelDataType type0 = types.get(0);
-    // precheck that fieldCount is present
-    if (!type0.isStruct()) {
-      return null;
-    }
-    final int fieldCount = type0.getFieldCount();
-
-    // precheck that all types are structs with same number of fields
-    // and register desired nullability for the result
+    // NULL contributes nullability without contributing any field types.

Review Comment:
   how are these changes related to GEOGRAPHY?



##########
core/src/main/java/org/apache/calcite/sql/type/SqlTypeFactoryImpl.java:
##########
@@ -344,6 +351,10 @@ private static void assertBasic(SqlTypeName typeName) {
       return createTypeWithNullability(createSqlType(SqlTypeName.ANY),
           nullCount > 0 || nullableCount > 0);
     }
+    // Date/time shortcuts below can return before checking every input family.
+    if (geographyCount > 0 && geographyCount + nullCount < types.size()) {

Review Comment:
   what happens here?
   



##########
server/src/test/java/org/apache/calcite/test/ServerParserTest.java:
##########
@@ -87,6 +98,80 @@ class ServerParserTest extends SqlParserTest {
     sql(sql).ok(expected);
   }
 
+  @Test void testCreateTableGeographyTypes() {
+    final SqlParserFixture f = fixture()
+        .withConformance(SqlConformanceEnum.LENIENT)
+        .withConfig(c -> c.withQuoting(Quoting.BACK_TICK));
+    final SqlCreateTable table = (SqlCreateTable) f.sql("create table t ("
+        + "a geography, b geography not null, c geography array, "
+        + "d map<integer, geography>, e row(g geography null, h geography not 
null) not null)")
+        .node();
+    final String unparsed = table.toSqlString(AnsiSqlDialect.DEFAULT).getSql();
+    final SqlCreateTable reparsed = (SqlCreateTable) f.sql(unparsed).node();
+
+    final SqlValidator validator = f.factory.createValidator();
+    final RelDataTypeFactory types = validator.getTypeFactory();
+    final RelDataType geography = types.createSqlType(SqlTypeName.GEOGRAPHY);
+    final RelDataType nullableGeography = 
types.createTypeWithNullability(geography, true);
+    final RelDataType map =
+        types.createMapType(types.createSqlType(SqlTypeName.INTEGER), 
nullableGeography);
+    final RelDataType row = types.builder().add("G", 
nullableGeography).add("H", geography).build();
+    final RelDataType[] expectedTypes = {
+        nullableGeography,
+        geography,
+        
types.createTypeWithNullability(types.createArrayType(nullableGeography, -1), 
true),
+        types.createTypeWithNullability(map, true),
+        row
+    };
+    final SqlNodeList columns = requireNonNull(table.columnList);
+    final SqlNodeList reparsedColumns = requireNonNull(reparsed.columnList);
+    assertEquals(expectedTypes.length, columns.size());
+    assertEquals(columns.size(), reparsedColumns.size());
+    for (int i = 0; i < columns.size(); i++) {
+      final SqlColumnDeclaration column = (SqlColumnDeclaration) 
columns.get(i);
+      final SqlColumnDeclaration reparsedColumn = (SqlColumnDeclaration) 
reparsedColumns.get(i);
+      assertEquals(column.dataType.getNullable(), 
reparsedColumn.dataType.getNullable());
+      assertEquals(expectedTypes[i], column.dataType.deriveType(validator));
+      assertEquals(expectedTypes[i], 
reparsedColumn.dataType.deriveType(validator));
+    }
+  }
+
+  @Test void testOrdinaryMapNullabilityRoundTrip() {
+    for (boolean nullableKeys : new boolean[] {false, true}) {
+      final SqlParserFixture f = fixture().withConfig(c -> 
c.withQuoting(Quoting.BACK_TICK))
+          .withFactory(factory ->
+          factory.withTypeSystem(system -> new DelegatingTypeSystem(system) {
+            @Override public boolean mapKeysCanBeNullable() {

Review Comment:
   I think this should be a separate JIRA issue



##########
core/src/main/java/org/apache/calcite/sql/SqlMapTypeNameSpec.java:
##########
@@ -20,18 +20,20 @@
 import org.apache.calcite.sql.parser.SqlParserPos;
 import org.apache.calcite.sql.type.SqlTypeName;
 import org.apache.calcite.sql.validate.SqlValidator;
+import org.apache.calcite.sql.validate.SqlValidatorUtil;
 import org.apache.calcite.util.Litmus;
 
 /**
- * Parse SQL MAP type, i.e. MAP&lt;INT NOT NULL, TIMESTAMP NULL&gt;, the key 
and value can specify a
- * suffix to indicate if the type is nullable, default is not null.
+ * SQL MAP type, for example MAP&lt;INT NOT NULL, TIMESTAMP NULL&gt;.
+ * The key defaults to the type system's map-key nullability and the value 
defaults to nullable.
  *
  * <p>MAP type does not belong to standard SQL.
  */
 public class SqlMapTypeNameSpec extends SqlTypeNameSpec {
 
   private final SqlDataTypeSpec keyType;
   private final SqlDataTypeSpec valType;
+  private final boolean unparseNotNull;

Review Comment:
   how is this related?



##########
core/src/main/java/org/apache/calcite/sql/SqlSpatialTypeOperatorTable.java:
##########
@@ -75,7 +92,29 @@ public SqlSpatialTypeOperatorTable() {
             new JavaTypeFactoryImpl(),
             CalciteConnectionConfigImpl.DEFAULT);
 
-    operatorTable = SqlOperatorTables.of(catalogReader.getOperatorList());
+    operatorTable = SqlOperatorTables.of(ImmutableList.<SqlOperator>builder()
+        .addAll(catalogReader.getOperatorList())
+        .add(GEOGRAPHY_IS_EMPTY, GEOGRAPHY_GEOMETRY_TYPE)
+        .build());
+  }
+
+  private static SqlOperator geographyAccessor(String name, String method,
+      SqlTypeName resultType) {
+    final RelDataType geography = new 
JavaTypeFactoryImpl().createSqlType(SqlTypeName.GEOGRAPHY);
+    return new SqlUserDefinedFunction(new SqlIdentifier(name, 
SqlParserPos.ZERO),

Review Comment:
   why do these have to be user-defined functions?



##########
site/_docs/reference.md:
##########
@@ -1464,11 +1412,53 @@ Note:
   it will rely on the supplied time zone to provide correct semantics.
 * GEOMETRY is allowed only in certain
   [conformance levels]({{ site.apiRoot 
}}/org/apache/calcite/sql/validate/SqlConformance.html#allowGeometry--).
+* GEOGRAPHY is available in `BABEL` and `LENIENT` conformance.
+  See [GEOGRAPHY](#geography) for the type and execution rules.
 * Interval literals may only use time units
   YEAR, QUARTER, MONTH, WEEK, DAY, HOUR, MINUTE and SECOND. In certain
   [conformance levels]({{ site.apiRoot 
}}/org/apache/calcite/sql/validate/SqlConformance.html#allowPluralTimeUnits--),
   we also allow their plurals, YEARS, QUARTERS, MONTHS, WEEKS, DAYS, HOURS, 
MINUTES and SECONDS.
 
+### GEOGRAPHY
+
+Use `GEOGRAPHY` as a type name with
+[conformance that enables it]({{ site.apiRoot 
}}/org/apache/calcite/sql/validate/SqlConformance.html#allowGeography()).
+It is a non-reserved keyword. Column names and aliases may use the word
+`geography` under default conformance as well.
+
+`CAST(NULL AS GEOGRAPHY)` produces a nullable `GEOGRAPHY` value.
+The type name takes no parameters, and SQL has no non-NULL geography literal
+syntax. Casts between geography and the same type are valid. Casts between
+geography and concrete geometry, character, or binary types are rejected in

Review Comment:
   I had the impression that cast to VARCHAR works.



##########
build.gradle.kts:
##########
@@ -827,7 +837,7 @@ allprojects {
                 // 
checkers.add("org.checkerframework.checker.optional.OptionalChecker")
                 // 
checkers.add("org.checkerframework.checker.regex.RegexChecker")
                 // 
https://checkerframework.org/manual/#creating-debugging-options-progress
-                // extraJavacArgs.add("-Afilenames")
+                extraJavacArgs.add("-Afilenames")

Review Comment:
   why this change?



##########
core/src/main/java/org/apache/calcite/runtime/GeographyValue.java:
##########
@@ -0,0 +1,54 @@
+/*
+ * 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.calcite.runtime;
+
+import org.apache.calcite.linq4j.function.Strict;
+
+import org.locationtech.jts.geom.Geometry;
+
+import static java.util.Objects.requireNonNull;
+
+/**
+ * Java value supplied by adapters for the structural GEOGRAPHY accessors.

Review Comment:
   I don't think the javadoc of a class should describe who instantiates the 
class.
   Just say what this class represents.



##########
site/_docs/reference.md:
##########
@@ -1464,11 +1412,53 @@ Note:
   it will rely on the supplied time zone to provide correct semantics.
 * GEOMETRY is allowed only in certain
   [conformance levels]({{ site.apiRoot 
}}/org/apache/calcite/sql/validate/SqlConformance.html#allowGeometry--).
+* GEOGRAPHY is available in `BABEL` and `LENIENT` conformance.
+  See [GEOGRAPHY](#geography) for the type and execution rules.
 * Interval literals may only use time units
   YEAR, QUARTER, MONTH, WEEK, DAY, HOUR, MINUTE and SECOND. In certain
   [conformance levels]({{ site.apiRoot 
}}/org/apache/calcite/sql/validate/SqlConformance.html#allowPluralTimeUnits--),
   we also allow their plurals, YEARS, QUARTERS, MONTHS, WEEKS, DAYS, HOURS, 
MINUTES and SECONDS.
 
+### GEOGRAPHY
+
+Use `GEOGRAPHY` as a type name with
+[conformance that enables it]({{ site.apiRoot 
}}/org/apache/calcite/sql/validate/SqlConformance.html#allowGeography()).
+It is a non-reserved keyword. Column names and aliases may use the word
+`geography` under default conformance as well.
+
+`CAST(NULL AS GEOGRAPHY)` produces a nullable `GEOGRAPHY` value.
+The type name takes no parameters, and SQL has no non-NULL geography literal
+syntax. Casts between geography and the same type are valid. Casts between
+geography and concrete geometry, character, or binary types are rejected in
+both directions. These concrete cast rules apply inside supported collection
+and row types as well.
+
+`CASE`, `COALESCE`, and `UNION ALL` preserve `GEOGRAPHY` when their
+concrete inputs are geography and their remaining inputs are NULL.
+Nullability follows the corresponding expression or set operation.
+Geography can be an element of an `ARRAY` or `MULTISET`, a `MAP` value,
+or a `ROW` field. A nested geography leaf retains its type and nullability.
+
+Equality between two geography expressions can be validated. Ordinary equality
+produces nullable `BOOLEAN` when an operand is nullable, while
+`IS [NOT] DISTINCT FROM` produces non-nullable `BOOLEAN`. Calcite's local
+execution rejects geography equality and equality-dependent collection
+operations. Ordering operators and ordering keys reject geography, including
+nested geography leaves. Geography is also rejected as a key for `DISTINCT`,
+`GROUP BY`, deduplicating set operations, window partitioning, and `MAP` keys.
+
+The local engine can return a typed NULL and run the
+[structural geography accessors](spatial.html#geography-type) on values
+supplied by a geography-aware table. Non-NULL SQL literals and non-NULL
+default values are unsupported.
+`GEOGRAPHY` has its own type identity and uses the JDBC type code 
`Types.OTHER`.
+
+Calcite preserves its generic cast eligibility rules for `ANY`, `UNKNOWN`,

Review Comment:
   I don't understand this paragraph.



##########
core/src/main/java/org/apache/calcite/sql/SqlMapTypeNameSpec.java:
##########
@@ -20,18 +20,20 @@
 import org.apache.calcite.sql.parser.SqlParserPos;
 import org.apache.calcite.sql.type.SqlTypeName;
 import org.apache.calcite.sql.validate.SqlValidator;
+import org.apache.calcite.sql.validate.SqlValidatorUtil;
 import org.apache.calcite.util.Litmus;
 
 /**
- * Parse SQL MAP type, i.e. MAP&lt;INT NOT NULL, TIMESTAMP NULL&gt;, the key 
and value can specify a
- * suffix to indicate if the type is nullable, default is not null.
+ * SQL MAP type, for example MAP&lt;INT NOT NULL, TIMESTAMP NULL&gt;.
+ * The key defaults to the type system's map-key nullability and the value 
defaults to nullable.

Review Comment:
   I am not sure you can make this change, it is a breaking change.



##########
core/src/main/java/org/apache/calcite/sql/type/SqlTypeUtil.java:
##########
@@ -1020,6 +1020,27 @@ public static boolean canAssignFrom(
       return canAssignFrom(getComponentTypeOrThrow(toType), 
getComponentTypeOrThrow(fromType));
     }
 
+    if (containsGeography(toType) || containsGeography(fromType)) {
+      final SqlTypeName typeName = toType.getSqlTypeName();
+      if (typeName != fromType.getSqlTypeName()) {
+        return false;
+      }
+      if (typeName == SqlTypeName.MULTISET) {

Review Comment:
   these also seem to be unrelated changes



-- 
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