public void TestSignaturesV2_3_X() { Column col1 = Column("age"); Column col2 = Column("name"); WindowSpec windowSpec = PartitionBy("age"); windowSpec = windowSpec.PartitionBy("age"); windowSpec = windowSpec.PartitionBy("age", "name"); windowSpec = windowSpec.PartitionBy(); windowSpec = windowSpec.PartitionBy(col1); windowSpec = windowSpec.PartitionBy(col1, col2); windowSpec = windowSpec.OrderBy("age"); windowSpec = windowSpec.OrderBy("age", "name"); windowSpec = windowSpec.OrderBy(); windowSpec = windowSpec.OrderBy(col1); windowSpec = windowSpec.OrderBy(col1, col2); windowSpec = windowSpec.RowsBetween( Sql.Expressions.Window.UnboundedPreceding, Sql.Expressions.Window.UnboundedFollowing); windowSpec = windowSpec.RangeBetween( Sql.Expressions.Window.UnboundedPreceding, Sql.Expressions.Window.UnboundedFollowing); windowSpec = windowSpec.RangeBetween(UnboundedPreceding(), UnboundedFollowing()); }
public void TestOver() { { Column column1 = CreateColumn("col1"); var windowSpec = new WindowSpec(new JvmObjectReference("windowSpec", _mockJvm.Object)); column1.Over(); VerifyNonStaticCall(column1, "over"); } { Column column1 = CreateColumn("col1"); var windowSpec = new WindowSpec(new JvmObjectReference("windowSpec", _mockJvm.Object)); column1.Over(windowSpec); VerifyNonStaticCall(column1, "over", windowSpec); } }
public static WindowSpec getSpec(IntPtr handle) { WindowSpec spec = new WindowSpec(); spec.handle = handle; //해당 창으로부터 창제목을 가져옵니다. StringBuilder sbTitle = new StringBuilder(64); SendMessage(handle, WmMessages.WM_GETTEXT, sbTitle.Capacity, sbTitle); spec.title = sbTitle.ToString(); //해당 창의 클래스 이름을 가져옵니다. StringBuilder sbClassName = new StringBuilder(64); GetClassName(handle, sbClassName, sbClassName.Capacity); spec.className = sbClassName.ToString(); return(spec); }
public void TestSignaturesV2_3_X() { Column col1 = Column("age"); Column col2 = Column("name"); WindowSpec windowSpec = PartitionBy("age"); Assert.IsType <WindowSpec>(windowSpec.PartitionBy("age")); Assert.IsType <WindowSpec>(windowSpec.PartitionBy("age", "name")); Assert.IsType <WindowSpec>(windowSpec.PartitionBy()); Assert.IsType <WindowSpec>(windowSpec.PartitionBy(col1)); Assert.IsType <WindowSpec>(windowSpec.PartitionBy(col1, col2)); Assert.IsType <WindowSpec>(windowSpec.OrderBy("age")); Assert.IsType <WindowSpec>(windowSpec.OrderBy("age", "name")); Assert.IsType <WindowSpec>(windowSpec.OrderBy()); Assert.IsType <WindowSpec>(windowSpec.OrderBy(col1)); Assert.IsType <WindowSpec>(windowSpec.OrderBy(col1, col2)); Assert.IsType <WindowSpec>( windowSpec.RowsBetween( Sql.Expressions.Window.UnboundedPreceding, Sql.Expressions.Window.UnboundedFollowing)); Assert.IsType <WindowSpec>( windowSpec.RangeBetween( Sql.Expressions.Window.UnboundedPreceding, Sql.Expressions.Window.UnboundedFollowing)); if (SparkSettings.Version < new Version(Versions.V3_0_0)) { // The following APIs are removed in Spark 3.0. Assert.IsType <WindowSpec>( windowSpec.RangeBetween( UnboundedPreceding(), UnboundedFollowing())); } }
/// <summary> /// Defines a windowing column. /// </summary> /// <param name="window"> /// A window specification that defines the partitioning, ordering, and frame boundaries. /// </param> /// <returns>Column object</returns> public Column Over(WindowSpec window) { return(ApplyMethod("over", window)); }