Jason Fehr has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/24536 )

Change subject: IMPALA-15162: Add GEOMETRY column support for Iceberg and 
Parquet
......................................................................


Patch Set 23:

(5 comments)

http://gerrit.cloudera.org:8080/#/c/24536/23/fe/src/main/java/org/apache/impala/analysis/AnalysisContext.java
File fe/src/main/java/org/apache/impala/analysis/AnalysisContext.java:

http://gerrit.cloudera.org:8080/#/c/24536/23/fe/src/main/java/org/apache/impala/analysis/AnalysisContext.java@574
PS23, Line 574:     private void checkResultTypes() throws AnalysisException {
For the record, I disagree with this approach.  It gives the clients more 
flexibility if Impala returns the WKB by default instead of forcing ST_AsText, 
but this change is not the correct place to debate this topic.  The correct 
place is IMPALA-15244.


http://gerrit.cloudera.org:8080/#/c/24536/23/fe/src/main/java/org/apache/impala/analysis/TableDef.java
File fe/src/main/java/org/apache/impala/analysis/TableDef.java:

http://gerrit.cloudera.org:8080/#/c/24536/23/fe/src/main/java/org/apache/impala/analysis/TableDef.java@466
PS23, Line 466:     String fmtVer = 
getTblProperties().get(IcebergTable.FORMAT_VERSION);
              :     Integer formatVersion = (fmtVer != null && 
!fmtVer.trim().isEmpty())
              :         ? Ints.tryParse(fmtVer.trim()) : null;
I don't like how this Iceberg table version property parsing code is repeated 
here, but I found multiple other pre-existing copies of this code.  Thus, 
removing the duplications is beyond the scope of this change.  Please open a 
Jira to consolidate all the Iceberg table version property parsing into a 
single method.


http://gerrit.cloudera.org:8080/#/c/24536/23/fe/src/main/java/org/apache/impala/util/IcebergSchemaConverter.java
File fe/src/main/java/org/apache/impala/util/IcebergSchemaConverter.java:

http://gerrit.cloudera.org:8080/#/c/24536/23/fe/src/main/java/org/apache/impala/util/IcebergSchemaConverter.java@106
PS23, Line 106:         if (!crs.equals(Types.GeometryType.DEFAULT_CRS)) {
This line is not quite doing what the comment says.  Right now, it is calling 
.equals() on java.lang.String which is doing a case sensitive compare.  If we 
go with iceberg-api version 1.12.0, it contains a fix to the 
Types.GeometryType.equals() method which does a case insensitive compare:  
https://github.com/apache/iceberg/commit/8e46f49123f81fc5d8c87dbbdaa6eb5ea103cb86#diff-78fdb1926e230d4d08b0c5baccdbd2357c38110a5d2d63d278e517f1975cebdfR608-R611

If we are sticking with iceberg-api version 1.11.0, then update this line to 
use crs.equalsIgnoreCase()


http://gerrit.cloudera.org:8080/#/c/24536/23/java/shaded-deps/impala-iceberg-runtime/src/main/java/org/apache/iceberg/hive/HiveSchemaUtil.java
File 
java/shaded-deps/impala-iceberg-runtime/src/main/java/org/apache/iceberg/hive/HiveSchemaUtil.java:

http://gerrit.cloudera.org:8080/#/c/24536/23/java/shaded-deps/impala-iceberg-runtime/src/main/java/org/apache/iceberg/hive/HiveSchemaUtil.java@40
PS23, Line 40: public final class HiveSchemaUtil {
Since there is no git history for this file, please add a comment stating which 
git repo/commit was used as the starting point.


http://gerrit.cloudera.org:8080/#/c/24536/23/tests/query_test/test_geospatial_functions.py
File tests/query_test/test_geospatial_functions.py:

http://gerrit.cloudera.org:8080/#/c/24536/23/tests/query_test/test_geospatial_functions.py@119
PS23, Line 119:   def test_iceberg_geometry_non_default_crs(self, 
unique_database, tmpdir):
I think we should also add test cases like this one except the geometry type is 
modified to 'geometry(OGC:CRS84)' and 'geometry(ogc:crs84)' and the test passes.



--
To view, visit http://gerrit.cloudera.org:8080/24536
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I32d8c12a6b71708646fbfc06a6dd8f7aaf4f5e6b
Gerrit-Change-Number: 24536
Gerrit-PatchSet: 23
Gerrit-Owner: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Arnab Karmakar <[email protected]>
Gerrit-Reviewer: Balazs Hevele <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Jason Fehr <[email protected]>
Gerrit-Comment-Date: Fri, 23 Oct 2026 17:25:40 +0000
Gerrit-HasComments: Yes

Reply via email to