forked from apache/spark
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from SandishKumarHN/redo-array
unit tests for protobuf repeated message
- Loading branch information
Showing
3 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
connector/proto/src/test/resources/protobuf/repeated_message.desc
This file contains 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
22 changes: 22 additions & 0 deletions
22
connector/proto/src/test/resources/protobuf/repeated_message.proto
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// To compile and create test class: | ||
// protoc --java_out=connector/proto/src/test/resources/protobuf/ connector/proto/src/test/resources/protobuf/repeated_message.proto | ||
// protoc --descriptor_set_out=connector/proto/src/test/resources/protobuf/repeated_message.desc --java_out=connector/proto/src/test/resources/protobuf/org/apache/spark/sql/proto/ connector/proto/src/test/resources/protobuf/repeated_message.proto | ||
|
||
syntax = "proto3"; | ||
|
||
package org.apache.spark.sql.proto; | ||
option java_outer_classname = "RepeatedMessageProtos"; | ||
|
||
message BasicMessage { | ||
int64 id = 1; | ||
string string_value = 2; | ||
int32 int32_value = 3; | ||
int64 int64_value = 4; | ||
double double_value = 5; | ||
float float_value = 6; | ||
bool bool_value = 7; | ||
bytes bytes_value = 8; | ||
} | ||
message RepeatedMessage { | ||
repeated BasicMessage basic_message = 1; | ||
} |
This file contains 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