beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ming...@apache.org
Subject [1/2] beam git commit: Add @Experimental and ImmutableList.copyOf
Date Thu, 17 Aug 2017 18:32:35 GMT
Repository: beam
Updated Branches:
  refs/heads/DSL_SQL a1cc5518e -> c2acb54f6


Add @Experimental and ImmutableList.copyOf


Project: http://git-wip-us.apache.org/repos/asf/beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/670c2ee3
Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/670c2ee3
Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/670c2ee3

Branch: refs/heads/DSL_SQL
Commit: 670c2ee3f3ab03df60b89eb7f4d16760d43e0bd5
Parents: a1cc551
Author: Tyler Akidau <takidau@apache.org>
Authored: Tue Aug 15 16:05:11 2017 -0700
Committer: Tyler Akidau <takidau@apache.org>
Committed: Tue Aug 15 16:05:11 2017 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/beam/sdk/coders/BeamRecordCoder.java | 3 ++-
 .../core/src/main/java/org/apache/beam/sdk/values/BeamRecord.java | 3 ++-
 .../org/apache/beam/sdk/extensions/sql/BeamRecordSqlType.java     | 3 ++-
 .../main/java/org/apache/beam/sdk/extensions/sql/BeamSqlUdf.java  | 2 ++
 4 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/670c2ee3/sdks/java/core/src/main/java/org/apache/beam/sdk/coders/BeamRecordCoder.java
----------------------------------------------------------------------
diff --git a/sdks/java/core/src/main/java/org/apache/beam/sdk/coders/BeamRecordCoder.java
b/sdks/java/core/src/main/java/org/apache/beam/sdk/coders/BeamRecordCoder.java
index 7b1b681..79b727f 100644
--- a/sdks/java/core/src/main/java/org/apache/beam/sdk/coders/BeamRecordCoder.java
+++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/coders/BeamRecordCoder.java
@@ -17,6 +17,7 @@
  */
 package org.apache.beam.sdk.coders;
 
+import com.google.common.collect.ImmutableList;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
@@ -105,6 +106,6 @@ public class BeamRecordCoder extends CustomCoder<BeamRecord> {
   }
 
   public List<Coder> getCoders() {
-    return coders;
+    return ImmutableList.copyOf(coders);
   }
 }

http://git-wip-us.apache.org/repos/asf/beam/blob/670c2ee3/sdks/java/core/src/main/java/org/apache/beam/sdk/values/BeamRecord.java
----------------------------------------------------------------------
diff --git a/sdks/java/core/src/main/java/org/apache/beam/sdk/values/BeamRecord.java b/sdks/java/core/src/main/java/org/apache/beam/sdk/values/BeamRecord.java
index fd26f46..1ff2c9f 100644
--- a/sdks/java/core/src/main/java/org/apache/beam/sdk/values/BeamRecord.java
+++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/values/BeamRecord.java
@@ -17,6 +17,7 @@
  */
 package org.apache.beam.sdk.values;
 
+import com.google.common.collect.ImmutableList;
 import java.io.Serializable;
 import java.math.BigDecimal;
 import java.util.ArrayList;
@@ -282,7 +283,7 @@ public class BeamRecord implements Serializable {
    * Return the list of data values.
    */
   public List<Object> getDataValues() {
-    return dataValues;
+    return ImmutableList.copyOf(dataValues);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/beam/blob/670c2ee3/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/BeamRecordSqlType.java
----------------------------------------------------------------------
diff --git a/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/BeamRecordSqlType.java
b/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/BeamRecordSqlType.java
index 5269867..ac6f278 100644
--- a/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/BeamRecordSqlType.java
+++ b/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/BeamRecordSqlType.java
@@ -17,6 +17,7 @@
  */
 package org.apache.beam.sdk.extensions.sql;
 
+import com.google.common.collect.ImmutableList;
 import java.math.BigDecimal;
 import java.sql.Types;
 import java.util.ArrayList;
@@ -155,7 +156,7 @@ public class BeamRecordSqlType extends BeamRecordType {
   }
 
   public List<Integer> getFieldTypes() {
-    return fieldTypes;
+    return ImmutableList.copyOf(fieldTypes);
   }
 
   public Integer getFieldTypeByIndex(int index){

http://git-wip-us.apache.org/repos/asf/beam/blob/670c2ee3/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/BeamSqlUdf.java
----------------------------------------------------------------------
diff --git a/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/BeamSqlUdf.java
b/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/BeamSqlUdf.java
index d4828e7..91bad20 100644
--- a/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/BeamSqlUdf.java
+++ b/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/BeamSqlUdf.java
@@ -18,6 +18,7 @@
 package org.apache.beam.sdk.extensions.sql;
 
 import java.io.Serializable;
+import org.apache.beam.sdk.annotations.Experimental;
 
 /**
  * Interface to create a UDF in Beam SQL.
@@ -36,6 +37,7 @@ import java.io.Serializable;
  * <p>The first parameter is named "s" and is mandatory,
  * and the second parameter is named "n" and is optional.
  */
+@Experimental
 public interface BeamSqlUdf extends Serializable {
   String UDF_METHOD = "eval";
 }


Mime
View raw message