-
Notifications
You must be signed in to change notification settings - Fork 72
Introduce type-parameterized array and map APIs; replace wrapper primitive types with Java primitive types #34
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
Open
wmoustafa
wants to merge
50
commits into
master
Choose a base branch
from
wmoustafa-api-v1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…itive types with Java primitive types
shardulm94
reviewed
Jan 28, 2020
transportable-udfs-api/src/main/java/com/linkedin/transport/api/StdFactory.java
Outdated
Show resolved
Hide resolved
transportable-udfs-api/src/main/java/com/linkedin/transport/api/data/RowData.java
Outdated
Show resolved
Hide resolved
transportable-udfs-api/src/main/java/com/linkedin/transport/api/data/StdData.java
Outdated
Show resolved
Hide resolved
transportable-udfs-api/src/main/java/com/linkedin/transport/api/udf/StdUDF.java
Outdated
Show resolved
Hide resolved
...-udfs-example-udfs/src/main/java/com/linkedin/transport/examples/ArrayElementAtFunction.java
Show resolved
Hide resolved
transportable-udfs-avro/src/main/java/com/linkedin/transport/avro/AvroWrapper.java
Show resolved
Hide resolved
transportable-udfs-avro/src/main/java/com/linkedin/transport/avro/StdUdfWrapper.java
Show resolved
Hide resolved
transportable-udfs-avro/src/main/java/com/linkedin/transport/avro/StdUdfWrapper.java
Outdated
Show resolved
Hide resolved
...ortable-udfs-codegen/src/main/java/com/linkedin/transport/codegen/SparkWrapperGenerator.java
Show resolved
Hide resolved
...le-udfs-compile-utils/src/main/java/com/linkedin/transport/compile/TransportUDFMetadata.java
Show resolved
Hide resolved
Co-authored-by: Sushant Raikar <[email protected]>
Why: we don't need it What changed: instead of checking configuration for hints on whether we are unit testing, we trust the URI's protocol Tests performed: ./gradlew build
Some major changes: - `SqlFunction`, `SqlScalarFunction` and `ScalarFunctionImplementation` have evolved in trinodb/trino#1764 - `Metadata::getScalarFunctionImplementation` evolved in trinodb/trino#1039 - Type signature parser was moved to presto-main in trinodb/trino#1738
shardulm94
previously approved these changes
May 20, 2020
* Introduce StdFloat, StdDouble, and StdBinary interfaces * Add implementations of those interfaces in Avro, Hive, Presto, Spark, and Generic type systems * Add examples of transport UDFs on those new types, and add tests for those UDFs * Update documentation
…truct creation (#50)
Co-authored-by: Raymond Lam <[email protected]>
- 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: