Skip to content

Conversation

wmoustafa
Copy link
Contributor

This change introduces type-parameterized array and map APIs, so UDF developers can no longer need to cast array and map contents explicitly, but instead use type-safe APIs at compile time.

It also replaces primitive wrapper types (such as StdInteger, StdLong, StdString, etc) with Java primitive types (Integer, Long, String, etc). As a result, developers no longer need to unwrap StdXXX types to get underlying values. null handling is now simpler, since the primitive value and null values are both captured in the same object (the primitive), instead of using StdXXX to represent nulls when required, and using the underlying object (StdXXX.get()) to represent the value when it is non-null.

As a result of moving to primitive Java types, the class StdData no longer exists, and all StdUDF_N type parameters extend Object, and many methods that manipulate StdData now manipulate Object types instead.

Also, this patch renames StdArray and StdMap types to ArrayData and MapData types, respectively.

Furthermore, it renames StdStruct to RowData, so the Java type name (RowData) corresponds to the type used in the UDF signature ("row").

TODO:

  • Discuss whether to rename StdUDF_X in this patch or a subsequent one. Did not want to make it here to simplify review process, but it is another backward incompatible change.
  • Increment major version.

shardulm94
shardulm94 previously approved these changes May 20, 2020
shardulm94 and others added 23 commits August 12, 2020 22:21
- Change the Checkstyle severity level from warning to error
- Eliminate all existing checkstyle violations

Co-authored-by: Carl Steinbach <[email protected]>
* Add travis-build.sh for pre-commit testing from command line

* Fix name of build file in comment

Co-authored-by: Carl Steinbach <[email protected]>
Co-authored-by: Shardul Mahadik <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants