clownxc commented on code in PR #40400:
URL: https://github.com/apache/spark/pull/40400#discussion_r1148677615
##########
sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/UnsafeRow.java:
##########
@@ -73,48 +74,44 @@ public static int calculateBitSetWidthInBytes(int
numFields) {
/**
* Field types that can be updated in place in UnsafeRows (e.g. we support
set() for these types)
*/
- public static final Set<DataType> mutableFieldTypes;
+ public static final Set<PhysicalDataType> mutableFieldTypes;
// DecimalType, DayTimeIntervalType and YearMonthIntervalType are also
mutable
static {
mutableFieldTypes = Collections.unmodifiableSet(
new HashSet<>(
Arrays.asList(
- NullType,
- BooleanType,
- ByteType,
- ShortType,
- IntegerType,
- LongType,
- FloatType,
- DoubleType,
- DateType,
- TimestampType,
- TimestampNTZType
+ PhysicalNullType$.MODULE$,
Review Comment:
> this looks ugly. Instead of having a Set, shall we just add a `def
isPrimitive` in `PhysicalDataType`?
done
--
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]