{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/6874","labels_url":"https://api.github.com/repos/apache/spark/issues/6874/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/6874/comments","events_url":"https://api.github.com/repos/apache/spark/issues/6874/events","html_url":"https://github.com/apache/spark/pull/6874","id":89224543,"number":6874,"title":"[SPARK-8407][SQL]complex type constructors: struct and named_struct","user":{"login":"yijieshen","id":1387718,"avatar_url":"https://avatars.githubusercontent.com/u/1387718?v=3","gravatar_id":"","url":"https://api.github.com/users/yijieshen","html_url":"https://github.com/yijieshen","followers_url":"https://api.github.com/users/yijieshen/followers","following_url":"https://api.github.com/users/yijieshen/following{/other_user}","gists_url":"https://api.github.com/users/yijieshen/gists{/gist_id}","starred_url":"https://api.github.com/users/yijieshen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yijieshen/subscriptions","organizations_url":"https://api.github.com/users/yijieshen/orgs","repos_url":"https://api.github.com/users/yijieshen/repos","events_url":"https://api.github.com/users/yijieshen/events{/privacy}","received_events_url":"https://api.github.com/users/yijieshen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":53,"created_at":"2015-06-18T07:49:29Z","updated_at":"2015-07-02T13:46:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/6874","html_url":"https://github.com/apache/spark/pull/6874","diff_url":"https://github.com/apache/spark/pull/6874.diff","patch_url":"https://github.com/apache/spark/pull/6874.patch"},"body":"This is a follow up of [SPARK-8283](https://issues.apache.org/jira/browse/SPARK-8283) ([PR-6828](https://github.com/apache/spark/pull/6828)), to support both `struct` and `named_struct` in Spark SQL.\r\n\r\nAfter [#6725](https://github.com/apache/spark/pull/6828), the semantic of [`CreateStruct`](https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/complexTypes.scala#L56) methods have changed a little and do not limited to cols of `NamedExpressions`, it will name non-NamedExpression fields following the hive convention, col1, col2 ...\r\n\r\nThis PR would both loosen [`struct`](https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/functions.scala#L723) to take children of `Expression` type and add `named_struct` support. "},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/118038287","html_url":"https://github.com/apache/spark/pull/6874#issuecomment-118038287","issue_url":"https://api.github.com/repos/apache/spark/issues/6874","id":118038287,"user":{"login":"SparkQA","id":8108735,"avatar_url":"https://avatars.githubusercontent.com/u/8108735?v=3","gravatar_id":"","url":"https://api.github.com/users/SparkQA","html_url":"https://github.com/SparkQA","followers_url":"https://api.github.com/users/SparkQA/followers","following_url":"https://api.github.com/users/SparkQA/following{/other_user}","gists_url":"https://api.github.com/users/SparkQA/gists{/gist_id}","starred_url":"https://api.github.com/users/SparkQA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SparkQA/subscriptions","organizations_url":"https://api.github.com/users/SparkQA/orgs","repos_url":"https://api.github.com/users/SparkQA/repos","events_url":"https://api.github.com/users/SparkQA/events{/privacy}","received_events_url":"https://api.github.com/users/SparkQA/received_events","type":"User","site_admin":false},"created_at":"2015-07-02T13:46:08Z","updated_at":"2015-07-02T13:46:08Z","body":"  [Test build #36399 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/36399/consoleFull) for   PR 6874 at commit [`d599d0b`](https://github.com/apache/spark/commit/d599d0b94c03a72583b3425f0676269e11bc3188)."}}