Skip to content

Commit

Permalink
first take at removing table api
Browse files Browse the repository at this point in the history
  • Loading branch information
aloneguid committed Sep 23, 2024
1 parent ac8fffd commit 61c61d3
Show file tree
Hide file tree
Showing 32 changed files with 33 additions and 3,202 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: 'Build'

env:
VERSION: 4.25.0
# PACKAGE_SUFFIX: '-pre.3'
PACKAGE_SUFFIX: ''
VERSION: 5.0.0
PACKAGE_SUFFIX: '-pre.1'
# PACKAGE_SUFFIX: ''
ASM_VERSION: 4.0.0
DOC_INSTANCE: wrs/pq
DOC_ARTIFACT: webHelpPQ2-all.zip
Expand Down
6 changes: 6 additions & 0 deletions docs/release-history.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 5.0.0

### Breaking changes

- Table/Row API is now removed.

## 4.25.0

### Improvements
Expand Down
9 changes: 0 additions & 9 deletions src/Parquet.Test/DecimalTypeTest.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
using System;
using Parquet.Data;
using Xunit;
using System.Threading.Tasks;
using Parquet.Schema;
using Parquet.Rows;

namespace Parquet.Test {
public class DecimalTypeTest : TestBase {
[Fact]
public async Task Read_File_As_Table_With_Decimal_Column_Should_Read_File() {
const int decimalColumnIndex = 4;
Table table = await ReadTestFileAsTableAsync("test-types-with-decimal.parquet");

Assert.Equal(1234.56m, table[0].Get<decimal>(decimalColumnIndex));
}

[Fact]
public void Validate_Scale_Zero_Should_Be_Allowed() {
Expand Down
23 changes: 0 additions & 23 deletions src/Parquet.Test/DocRef.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System.Linq;
using System.Threading.Tasks;
using Parquet.Data;
using Parquet.Rows;
using Parquet.Schema;
using Xunit;

Expand All @@ -20,28 +19,6 @@ class Record {

public class DocTest {

//[Fact]
public async Task Write2() {
var table = new Table(
new DataField<DateTime>("Timestamp"),
new DataField<string>("EventName"),
new DataField<double>("MeterName"));

for(int i = 0; i < 10; i++) {
table.Add(
DateTime.UtcNow.AddSeconds(1),
i % 2 == 0 ? "on" : "off",
(double)i);
}

System.IO.File.Delete("c:\\tmp\\data.parquet");
await table.WriteAsync("c:\\tmp\\data.parquet");

Table tbl = await Table.ReadAsync("c:\\tmp\\data.parquet");
Assert.NotNull(tbl);
}


//[Fact]
public async Task Write3() {
var schema = new ParquetSchema(
Expand Down
24 changes: 0 additions & 24 deletions src/Parquet.Test/Encodings/DeltaBinaryPackedEncodingTest.cs
Original file line number Diff line number Diff line change
@@ -1,36 +1,12 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Parquet.Encodings;
using Parquet.Rows;
using Xunit;

namespace Parquet.Test.Encodings {
public class DeltaBinaryPackedEncodingTest : TestBase {
[Fact]
public async Task TestDeltaBinaryPackedFile() {
Table t;
using(Stream stream = OpenTestFile("test-delta-binary-packed.parquet")) {
using(ParquetReader reader = await ParquetReader.CreateAsync(stream)) {
t = await reader.ReadAsTableAsync();
}
}

Assert.Equal("{'column1': 1000}", t[0].ToString());
Assert.Equal("{'column1': 1}", t[1].ToString());
Assert.Equal("{'column1': 2}", t[2].ToString());
Assert.Equal("{'column1': 3}", t[3].ToString());
Assert.Equal("{'column1': 4}", t[4].ToString());
Assert.Equal("{'column1': 5}", t[5].ToString());
Assert.Equal("{'column1': 6}", t[6].ToString());
Assert.Equal("{'column1': 7}", t[7].ToString());
Assert.Equal("{'column1': 8}", t[8].ToString());
Assert.Equal("{'column1': 9}", t[9].ToString());
Assert.Equal("{'column1': 10}", t[10].ToString());
}

[Fact]
public void EncodeAndDecodeInt32() {
Expand Down
40 changes: 0 additions & 40 deletions src/Parquet.Test/FieldsDeserializationTest.cs

This file was deleted.

130 changes: 0 additions & 130 deletions src/Parquet.Test/Integration/TablesTest.cs

This file was deleted.

7 changes: 0 additions & 7 deletions src/Parquet.Test/ParquetReaderOnTestFilesTest.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Parquet.Data;
using Parquet.Rows;
using Parquet.Schema;
using System;
using System.Collections.Generic;
Expand Down Expand Up @@ -129,12 +128,6 @@ public async Task Read_delta_binary_packed() {
}
}

[Fact]
public async Task Read_col_names_with_trailing_dots() {
using Stream s = OpenTestFile("trailing_dot_col_name.parquet");
Table tbl = await ParquetReader.ReadTableFromStreamAsync(s);
Assert.NotNull(tbl);
}

[Fact]
public async Task Read_legacy_list() {
Expand Down
Loading

0 comments on commit 61c61d3

Please sign in to comment.