ayushtkn commented on code in PR #6581:
URL: https://github.com/apache/hive/pull/6581#discussion_r3618822023
##########
ql/src/java/org/apache/hadoop/hive/ql/udf/esri/ST_NumGeometries.java:
##########
@@ -61,18 +58,10 @@ public IntWritable evaluate(BytesWritable geomref) {
case ST_POLYGON:
LogUtils.Log_InvalidType(LOG, GeometryUtils.OGCType.ST_MULTIPOLYGON,
ogcType);
return null;
Review Comment:
They aren't a pairing of cases they're the two arguments of
`LogUtils.Log_InvalidType(logger, expecting, actual)`. The message template is
`"Invalid geometry type. Expecting %s but found %s"`, so this line logs
`"Invalid geometry type. Expecting ST_MULTIPOLYGON but found ST_POLYGON"`.
expecting is just the multi-counterpart of whatever single type was actually
passed, used purely to build a helpful error message same shape as the
`ST_POINT→ST_MULTIPOINT` and `ST_LINESTRING→ST_MULTILINESTRING` cases above it.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]