コード例 #1
0
 /// <summary>
 /// Call https://github.com/apache/spark/blob/branch-1.4/sql/core/src/main/scala/org/apache/spark/sql/DataFrame.scala, except(other: DataFrame): DataFrame
 /// </summary>
 /// <param name="otherScalaDataFrameReference"></param>
 /// <returns></returns>
 public IDataFrameProxy Subtract(IDataFrameProxy otherScalaDataFrameReference)
 {
     return
         (new DataFrameIpcProxy(new JvmObjectReference(
                                    SparkCLRIpcProxy.JvmBridge.CallNonStaticJavaMethod(
                                        jvmDataFrameReference, "except",
                                        new object[] { (otherScalaDataFrameReference as DataFrameIpcProxy).jvmDataFrameReference }).ToString()), sqlContextProxy));
 }
コード例 #2
0
 public IDataFrameProxy Join(IDataFrameProxy otherScalaDataFrameReference, string joinColumnName)
 {
     return
         (new DataFrameIpcProxy(new JvmObjectReference(
                                    SparkCLRIpcProxy.JvmBridge.CallNonStaticJavaMethod(jvmDataFrameReference, "join", new object[]
     {
         (otherScalaDataFrameReference as DataFrameIpcProxy).jvmDataFrameReference,
         joinColumnName
     }).ToString()
                                    ), sqlContextProxy));
 }
コード例 #3
0
        public IDataFrameProxy Join(IDataFrameProxy otherScalaDataFrameReference, string[] joinColumnNames)
        {
            var stringSequenceReference = new JvmObjectReference(
                SparkCLRIpcProxy.JvmBridge.CallStaticJavaMethod("org.apache.spark.sql.api.csharp.SQLUtils", "toSeq", new object[] { joinColumnNames }).ToString());

            return
                (new DataFrameIpcProxy(new JvmObjectReference(
                                           SparkCLRIpcProxy.JvmBridge.CallNonStaticJavaMethod(jvmDataFrameReference, "join", new object[]
            {
                (otherScalaDataFrameReference as DataFrameIpcProxy).jvmDataFrameReference,
                stringSequenceReference
            }).ToString()
                                           ), sqlContextProxy));
        }
コード例 #4
0
        public IDataFrameProxy Join(IDataFrameProxy otherScalaDataFrameReference, string[] joinColumnNames)
        {
            throw new NotSupportedException("Not supported in 1.4.1");

            //TODO - uncomment this in 1.5
            //var stringSequenceReference = new JvmObjectReference(
            //         SparkCLRIpcProxy.JvmBridge.CallStaticJavaMethod("org.apache.spark.sql.api.csharp.SQLUtils", "toSeq", new object[] { joinColumnNames }).ToString());

            //return
            //    new JvmObjectReference(
            //            SparkCLRIpcProxy.JvmBridge.CallNonStaticJavaMethod(scalaDataFrameReference, "join", new object[]
            //            {
            //                otherScalaDataFrameReference,
            //                stringSequenceReference
            //            }).ToString()
            //        );
        }
コード例 #5
0
 internal DataFrame(IDataFrameProxy dataFrameProxy, SparkContext sparkContext)
 {
     this.dataFrameProxy = dataFrameProxy;
     this.sparkContext   = sparkContext;
 }
コード例 #6
0
 public IDataFrameProxy Join(IDataFrameProxy otherScalaDataFrameReference, string[] joinColumnNames)
 {
     throw new NotImplementedException();
 }
コード例 #7
0
 public IDataFrameProxy Join(IDataFrameProxy otherScalaDataFrameReference, IColumnProxy scalaColumnReference, string joinType)
 {
     throw new NotImplementedException();
 }
コード例 #8
0
 public void RegisterDataFrameAsTable(IDataFrameProxy dataFrameProxy, string tableName)
 {
     SparkCLRIpcProxy.JvmBridge.CallNonStaticJavaMethod(
         jvmSqlContextReference, "registerDataFrameAsTable", 
         new object[] { (dataFrameProxy as DataFrameIpcProxy).JvmDataFrameReference, tableName });
 }
コード例 #9
0
ファイル: MockSqlContextProxy.cs プロジェクト: valmac/Mobius
 public void RegisterDataFrameAsTable(IDataFrameProxy dataFrameProxy, string tableName)
 {
     throw new NotImplementedException();
 }
コード例 #10
0
 public IDataFrameProxy Join(IDataFrameProxy otherScalaDataFrameReference, string joinColumnName)
 {
     return new MockDataFrameProxy(new object[] { otherScalaDataFrameReference, joinColumnName }, SqlContextProxy);
 }
コード例 #11
0
 public void RegisterDataFrameAsTable(IDataFrameProxy dataFrameProxy, string tableName)
 {
     throw new NotImplementedException();
 }
コード例 #12
0
 public IDataFrameProxy UnionAll(IDataFrameProxy other)
 {
     throw new NotImplementedException();
 }
コード例 #13
0
        public IDataFrameProxy Join(IDataFrameProxy otherScalaDataFrameReference, string[] joinColumnNames)
        {
            throw new NotSupportedException("Not supported in 1.4.1");

            //TODO - uncomment this in 1.5
            //var stringSequenceReference = new JvmObjectReference(
            //         SparkCLRIpcProxy.JvmBridge.CallStaticJavaMethod("org.apache.spark.sql.api.csharp.SQLUtils", "toSeq", new object[] { joinColumnNames }).ToString());

            //return
            //    new JvmObjectReference(
            //            SparkCLRIpcProxy.JvmBridge.CallNonStaticJavaMethod(scalaDataFrameReference, "join", new object[]
            //            {
            //                otherScalaDataFrameReference,
            //                stringSequenceReference
            //            }).ToString()
            //        );
        }
コード例 #14
0
 public IDataFrameProxy UnionAll(IDataFrameProxy other)
 {
     throw new NotImplementedException();
 }
コード例 #15
0
 public IDataFrameProxy Join(IDataFrameProxy otherScalaDataFrameReference, IColumnProxy scalaColumnReference, string joinType)
 {
     return
         new DataFrameIpcProxy(new JvmObjectReference(
             SparkCLRIpcProxy.JvmBridge.CallNonStaticJavaMethod(
                 jvmDataFrameReference, "join",
                 new object[]
                 {
                     (otherScalaDataFrameReference as DataFrameIpcProxy).jvmDataFrameReference,
                     (scalaColumnReference as ColumnIpcProxy).ScalaColumnReference,
                     joinType
                 }).ToString()), sqlContextProxy);
 }
コード例 #16
0
 public IDataFrameProxy Subtract(IDataFrameProxy other)
 {
     throw new NotImplementedException();
 }
コード例 #17
0
 public IDataFrameProxy Join(IDataFrameProxy otherScalaDataFrameReference, IColumnProxy scalaColumnReference, string joinType)
 {
     throw new NotImplementedException();
 }
コード例 #18
0
 public IDataFrameProxy Join(IDataFrameProxy otherScalaDataFrameReference, string[] joinColumnNames)
 {
     throw new NotImplementedException();
 }
コード例 #19
0
 public IDataFrameProxy Join(IDataFrameProxy otherScalaDataFrameReference, string[] joinColumnNames)
 {
     return(new MockDataFrameProxy(new object[] { otherScalaDataFrameReference, joinColumnNames }, SqlContextProxy));
 }
コード例 #20
0
 public void RegisterDataFrameAsTable(IDataFrameProxy dataFrameProxy, string tableName)
 {
     SparkCLRIpcProxy.JvmBridge.CallNonStaticJavaMethod(
         jvmSqlContextReference, "registerDataFrameAsTable",
         new object[] { (dataFrameProxy as DataFrameIpcProxy).JvmDataFrameReference, tableName });
 }
コード例 #21
0
 public IDataFrameProxy Join(IDataFrameProxy otherScalaDataFrameReference, IColumnProxy scalaColumnReference, string joinType)
 {
     return(new MockDataFrameProxy(new object[] { otherScalaDataFrameReference, scalaColumnReference, joinType }, SqlContextProxy));
 }
コード例 #22
0
 public IDataFrameProxy UnionAll(IDataFrameProxy otherScalaDataFrameReference)
 {
     return
         new DataFrameIpcProxy(new JvmObjectReference(
             SparkCLRIpcProxy.JvmBridge.CallNonStaticJavaMethod(
                 jvmDataFrameReference, "unionAll",
                 new object[] { (otherScalaDataFrameReference as DataFrameIpcProxy).jvmDataFrameReference }).ToString()), sqlContextProxy);
 }
コード例 #23
0
 public IDataFrameProxy Subtract(IDataFrameProxy other)
 {
     throw new NotImplementedException();
 }
コード例 #24
0
ファイル: DataFrame.cs プロジェクト: jango2015/SparkCLR
 internal DataFrame(IDataFrameProxy dataFrameProxy, SparkContext sparkContext)
 {
     this.dataFrameProxy = dataFrameProxy;
     this.sparkContext = sparkContext;
 }