Last active
November 4, 2020 01:35
-
-
Save rupeshtr78/5d073016dfa61116bf26c3e5dfe79135 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val userSchema = new StructType() | |
.add("id", "integer") | |
.add("name", "string") | |
.add("age", "integer") | |
.add("friends", "integer") | |
val carSchema = StructType(Array( | |
StructField("Name", StringType), | |
StructField("Miles_per_Gallon", DoubleType), | |
StructField("Cylinders", LongType), | |
StructField("Displacement", DoubleType) | |
val myRowSchema = new StructType(Array( | |
new StructField("some", StringType, true), | |
new StructField("col", StringType, true), | |
new StructField("names", LongType, false))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment