-
Notifications
You must be signed in to change notification settings - Fork 328
Fix the chained UDF with Row type #411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 14 commits
274f7e1
1fa97ff
9828a99
87caf70
2110e0b
728f406
48f92f4
7e3dbc5
57574ab
e829d78
9938ca9
44f5635
290df45
db0eba8
35e6441
ebdccec
de803d1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,6 @@ | |
// See the LICENSE file in the project root for more information. | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using Microsoft.Spark.Sql.Types; | ||
|
||
namespace Microsoft.Spark.Sql | ||
|
@@ -36,6 +34,24 @@ internal Row(object[] values, StructType schema) | |
Convert(); | ||
} | ||
|
||
/// <summary> | ||
/// Constructor for the schema-less Row class used for chained UDFs. | ||
/// </summary> | ||
/// <param name="genericRow">GenericRow to convert from</param> | ||
|
||
internal Row(GenericRow genericRow) | ||
{ | ||
_genericRow = genericRow; | ||
} | ||
|
||
/// <summary> | ||
/// Returns schema-less Row which can happen within chained UDFs (same behavior as PySpark). | ||
/// </summary> | ||
elvaliuliuliu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
/// <returns>schema-less Row</returns> | ||
public static implicit operator Row(GenericRow genericRow) | ||
{ | ||
return new Row(genericRow); | ||
} | ||
|
||
/// <summary> | ||
/// Schema associated with this row. | ||
/// </summary> | ||
|
Uh oh!
There was an error while loading. Please reload this page.