|
51 | 51 | [(g/row (g/row 27 42))
|
52 | 52 | (g/row (g/row 57 18))]
|
53 | 53 | {:coord {:x :int :y :int}}))
|
54 |
| - => {:coord "StructType(StructField(x,IntegerType,true), StructField(y,IntegerType,true))"}) |
| 54 | + => {:coord "StructType(StructField(x,IntegerType,true),StructField(y,IntegerType,true))"}) |
55 | 55 | (fact "of struct array fields"
|
56 | 56 | (g/dtypes
|
57 | 57 | (g/create-dataframe
|
58 | 58 | @tr/spark
|
59 | 59 | [(g/row [(g/row 27 42)])
|
60 | 60 | (g/row [(g/row 57 18)])]
|
61 | 61 | {:coords [{:x :int :y :int}]}))
|
62 |
| - => {:coords "ArrayType(StructType(StructField(x,IntegerType,true), StructField(y,IntegerType,true)),true)"})) |
| 62 | + => {:coords "ArrayType(StructType(StructField(x,IntegerType,true),StructField(y,IntegerType,true)),true)"})) |
63 | 63 |
|
64 | 64 | (facts "On building blocks"
|
65 | 65 | (fact "can instantiate vectors"
|
|
266 | 266 | (instance? Dataset dataset) => true
|
267 | 267 | (g/column-names dataset) => ["a" "b"]
|
268 | 268 | (g/dtypes dataset) => {:a "LongType"
|
269 |
| - :b "StructType(StructField(z,ArrayType(StringType,true),true), StructField(y,BooleanType,true))"})) |
| 269 | + :b "StructType(StructField(z,ArrayType(StringType,true),true),StructField(y,BooleanType,true))"})) |
270 | 270 | (fact "should create the right schema for list of maps"
|
271 | 271 | (let [dataset (g/table->dataset
|
272 | 272 | @tr/spark
|
|
276 | 276 | (instance? Dataset dataset) => true
|
277 | 277 | (g/column-names dataset) => ["a" "b"]
|
278 | 278 | (g/dtypes dataset) => {:a "LongType"
|
279 |
| - :b "ArrayType(StructType(StructField(z,LongType,true), StructField(y,DoubleType,true)),true)"})) |
| 279 | + :b "ArrayType(StructType(StructField(z,LongType,true),StructField(y,DoubleType,true)),true)"})) |
280 | 280 | (fact "should create the right schema for list of list of maps"
|
281 | 281 | (let [dataset (g/table->dataset
|
282 | 282 | @tr/spark
|
|
286 | 286 | (instance? Dataset dataset) => true
|
287 | 287 | (g/column-names dataset) => ["a" "b"]
|
288 | 288 | (g/dtypes dataset) => {:a "LongType"
|
289 |
| - :b "ArrayType(ArrayType(StructType(StructField(z,LongType,true), StructField(y,BooleanType,true)),true),true)"}))) |
| 289 | + :b "ArrayType(ArrayType(StructType(StructField(z,LongType,true),StructField(y,BooleanType,true)),true),true)"}))) |
290 | 290 |
|
291 | 291 | (facts "On spark range"
|
292 | 292 | (fact "should create simple datasets"
|
|
0 commit comments