Fei Shao created SPARK-21147: -------------------------------- Summary: the schema of socket source can not be set. Key: SPARK-21147 URL: https://issues.apache.org/jira/browse/SPARK-21147 Project: Spark Issue Type: Bug Components: Structured Streaming Affects Versions: 2.1.0 Environment: Win7,spark 2.1.0 Reporter: Fei Shao
The schema set for DataStreamReader can not work. The code is shown as below: val line = ss.readStream.format("socket") .option("ip",xxx) .option("port",xxx) .schema( StructField("name",StringType)::StructField("area",StringType)::Nil) .load line.printSchema The printSchema prints: root |--value:String(nullable=true) According to the code, it should print the schema set by schema(). Suggestion from Michael Armbrust: throw an exception saying that you can't set schema here. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org