MaxGekk commented on code in PR #44901:
URL: https://github.com/apache/spark/pull/44901#discussion_r1467724417
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/InternalRow.scala:
##########
@@ -140,7 +140,7 @@ object InternalRow {
case PhysicalLongType => (input, ordinal) => input.getLong(ordinal)
case PhysicalFloatType => (input, ordinal) => input.getFloat(ordinal)
case PhysicalDoubleType => (input, ordinal) => input.getDouble(ordinal)
- case PhysicalStringType => (input, ordinal) =>
input.getUTF8String(ordinal)
+ case PhysicalStringType(_) => (input, ordinal) =>
input.getUTF8String(ordinal)
Review Comment:
It is better to don't depend on the number of fields, see
https://github.com/databricks/scala-style-guide?tab=readme-ov-file#pattern-matching
```suggestion
case _: PhysicalStringType => (input, ordinal) =>
input.getUTF8String(ordinal)
```
##########
sql/api/src/main/scala/org/apache/spark/sql/types/StringType.scala:
##########
@@ -25,7 +25,7 @@ import org.apache.spark.annotation.Stable
* @since 1.3.0
*/
@Stable
-class StringType private() extends AtomicType {
+class StringType private(val collationId: Int) extends AtomicType {
Review Comment:
Could you add `@param` above and describe `collationId`, please.
--
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]