Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
vplauzon committed Oct 23, 2023
1 parent a0c79f2 commit 8a6a7fa
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using DeltaKustoIntegration.Database;
using DeltaKustoLib.CommandModel;
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Xunit;

namespace DeltaKustoAdxIntegrationTest.Policies.Partitioning
{
public class PartitioningPolicyTest : AdxAutoIntegrationTestBase
{
protected override string StatesFolderPath => "Policies/Partitioning";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.create table MyPartitioningTable(TIMESTAMP: datetime, TenantId:string, Level: int)

.alter table MyPartitioningTable policy partitioning ```
{
"PartitionKeys": [
{
"ColumnName": "TenantId",
"Kind": "Hash",
"Properties": {
"Function": "XxHash64",
"MaxPartitionCount": 32,
"PartitionAssignmentMode": "Uniform"
}
}
]
}```
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Random comment

.create table MyPartitioningTable(TIMESTAMP: datetime, TenantId:string, Level: int)

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.create table MyPartitioningTable(TIMESTAMP: datetime, TenantId:string, Level: int)

.alter table MyPartitioningTable policy partitioning ```
{
"PartitionKeys": [
{
"ColumnName": "TenantId",
"Kind": "Hash",
"Properties": {
"Function": "XxHash64",
"MaxPartitionCount": 128,
"PartitionAssignmentMode": "Uniform"
}
}
]
}```
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
.create table MyPartitioningTable(TIMESTAMP: datetime, TenantId:string, Level: int)

.alter table MyPartitioningTable policy partitioning
```
{
"PartitionKeys": [
{
"ColumnName": "TenantId",
"Kind": "Hash",
"Properties": {
"Function": "XxHash64",
"MaxPartitionCount": 128,
"PartitionAssignmentMode": "Uniform"
}
}
]
}
```

.create table MyPartitioningTable2(Id:string)

.alter table MyPartitioningTable2 policy partitioning
```
{
"PartitionKeys": [
{
"ColumnName": "Id",
"Kind": "Hash",
"Properties": {
"Function": "XxHash64",
"MaxPartitionCount": 128,
"PartitionAssignmentMode": "Uniform"
}
}
]
}
```

0 comments on commit 8a6a7fa

Please sign in to comment.