File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
sql/connect/common/src/main
scala/org/apache/spark/sql/connect/common Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,8 @@ message DataType {
69
69
70
70
// UnparsedDataType
71
71
Unparsed unparsed = 24 ;
72
+
73
+ Time time = 28 ;
72
74
}
73
75
74
76
// Reserved for geometry and geography types
@@ -127,6 +129,11 @@ message DataType {
127
129
uint32 type_variation_reference = 1 ;
128
130
}
129
131
132
+ message Time {
133
+ int32 precision = 1 ;
134
+ uint32 type_variation_reference = 2 ;
135
+ }
136
+
130
137
message CalendarInterval {
131
138
uint32 type_variation_reference = 1 ;
132
139
}
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ object DataTypeProtoConverter {
53
53
case proto.DataType .KindCase .DATE => DateType
54
54
case proto.DataType .KindCase .TIMESTAMP => TimestampType
55
55
case proto.DataType .KindCase .TIMESTAMP_NTZ => TimestampNTZType
56
+ case proto.DataType .KindCase .TIME => TimeType (t.getTime.getPrecision)
56
57
57
58
case proto.DataType .KindCase .CALENDAR_INTERVAL => CalendarIntervalType
58
59
case proto.DataType .KindCase .YEAR_MONTH_INTERVAL =>
@@ -204,6 +205,12 @@ object DataTypeProtoConverter {
204
205
205
206
case TimestampNTZType => ProtoDataTypes .TimestampNTZType
206
207
208
+ case TimeType (precision) =>
209
+ proto.DataType
210
+ .newBuilder()
211
+ .setTime(proto.DataType .Time .newBuilder().setPrecision(precision).build())
212
+ .build()
213
+
207
214
case CalendarIntervalType => ProtoDataTypes .CalendarIntervalType
208
215
209
216
case YearMonthIntervalType (startField, endField) =>
You can’t perform that action at this time.
0 commit comments