rdblue commented on code in PR #18629:
URL: https://github.com/apache/iceberg/pull/18629#discussion_r4745465449
##########
api/src/main/java/org/apache/iceberg/expressions/Literal.java:
##########
@@ -74,6 +75,22 @@ static Literal<BigDecimal> of(BigDecimal value) {
/** Returns the value wrapped by this literal. */
T value();
+ /**
+ * Returns the Iceberg type of this literal's value.
+ *
+ * @return the type of this literal
+ * @throws UnsupportedOperationException if this literal does not have a type
+ */
+ @Override
+ default Type type() {
+ throw new UnsupportedOperationException(getClass().getSimpleName() + "
does not have a type");
Review Comment:
Looks like the only literals that don't have a type are `AboveMax` and
`BelowMin`. That's reasonable because those are not exposed outside of the
package and are used for multiple types.
--
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]