You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (JIRA)" <ji...@apache.org> on 2018/11/26 16:25:00 UTC

[jira] [Commented] (SPARK-26171) Is Spark 2.3+ support UDT?

    [ https://issues.apache.org/jira/browse/SPARK-26171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16699226#comment-16699226 ] 

Hyukjin Kwon commented on SPARK-26171:
--------------------------------------

Questions should better go to mailing list. Let's only file an issue here. You could have a better answer there.

> Is Spark 2.3+ support UDT?
> --------------------------
>
>                 Key: SPARK-26171
>                 URL: https://issues.apache.org/jira/browse/SPARK-26171
>             Project: Spark
>          Issue Type: Question
>          Components: Examples
>    Affects Versions: 2.4.0
>            Reporter: SUNY TYAGI
>            Priority: Major
>
> I was going through this ticket https://issues.apache.org/jira/browse/SPARK-7768?jql=text%20~%20%22public%20udt%22 and could not understand that if spark support UDT in  2.3+ version in any language (scala, python , java, R) ?
> I have class something like this
> Class Test {
>        string name;
>        int age;
> } 
> And My UDF method is:
> public Test UDFMethod(string name, int age) {
>           Test ob = new Test();
>           ob.name = name;
>           ob.age = age;
> }
> Sample Spark query-   `{{Select *, UDFMethod(name, age) From SomeTable;`}}
> Now UDFMethod(name, age) will return Class Test object. So will this work in Spark SQL after using SQLUserDefinedType tag and extending UserDefinedType class. 
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org