Skip to content

Commit

Permalink
code review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
birschick-bq committed Oct 25, 2024
1 parent 18a7c8a commit f1a3795
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion csharp/src/Drivers/Apache/Hive2/HiveServer2Connection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ internal async Task OpenAsync()

internal abstract SchemaParser SchemaParser { get; }

internal abstract IArrowArrayStream NewReader<T>(T statement, Schema schema, CancellationToken cancellationToken = default) where T : HiveServer2Statement;
internal abstract IArrowArrayStream NewReader<T>(T statement, Schema schema) where T : HiveServer2Statement;

public override IArrowArrayStream GetObjects(GetObjectsDepth depth, string? catalogPattern, string? dbSchemaPattern, string? tableNamePattern, IReadOnlyList<string>? tableTypes, string? columnNamePattern)
{
Expand Down
5 changes: 2 additions & 3 deletions csharp/src/Drivers/Apache/Hive2/HiveServer2Reader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ internal class HiveServer2Reader : IArrowArrayStream
public HiveServer2Reader(
HiveServer2Statement statement,
Schema schema,
DataTypeConversion dataTypeConversion,
CancellationToken _ = default)
DataTypeConversion dataTypeConversion)
{
_statement = statement;
Schema = schema;
Expand All @@ -89,7 +88,7 @@ public HiveServer2Reader(
TFetchResultsResp response = await FetchNext(_statement, cancellationToken);

int columnCount = GetColumnCount(response);
int rowCount = GetRowCount(response, columnCount); ;
int rowCount = GetRowCount(response, columnCount);
if ((_statement.BatchSize > 0 && rowCount < _statement.BatchSize) || rowCount == 0)
{
// This is the last batch
Expand Down
2 changes: 1 addition & 1 deletion csharp/src/Drivers/Apache/Impala/ImpalaConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,6 @@ public override IArrowArrayStream GetTableTypes()

internal override SchemaParser SchemaParser { get; } = new HiveServer2SchemaParser();

internal override IArrowArrayStream NewReader<T>(T statement, Schema schema, CancellationToken cancellationToken = default) => new HiveServer2Reader(statement, schema, dataTypeConversion: DataTypeConversion, cancellationToken);
internal override IArrowArrayStream NewReader<T>(T statement, Schema schema) => new HiveServer2Reader(statement, schema, dataTypeConversion: DataTypeConversion);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public SparkDatabricksConnection(IReadOnlyDictionary<string, string> properties)
{
}

internal override IArrowArrayStream NewReader<T>(T statement, Schema schema, CancellationToken cancellationToken = default) => new SparkDatabricksReader(statement, schema);
internal override IArrowArrayStream NewReader<T>(T statement, Schema schema) => new SparkDatabricksReader(statement, schema);

internal override SchemaParser SchemaParser => new SparkDatabricksSchemaParser();

Expand Down
2 changes: 1 addition & 1 deletion csharp/src/Drivers/Apache/Spark/SparkHttpConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ protected override void ValidateOptions()
}
}

internal override IArrowArrayStream NewReader<T>(T statement, Schema schema, CancellationToken cancellationToken = default) => new HiveServer2Reader(statement, schema, dataTypeConversion: statement.Connection.DataTypeConversion, cancellationToken);
internal override IArrowArrayStream NewReader<T>(T statement, Schema schema) => new HiveServer2Reader(statement, schema, dataTypeConversion: statement.Connection.DataTypeConversion);

protected override Task<TTransport> CreateTransportAsync()
{
Expand Down
1 change: 1 addition & 0 deletions csharp/test/Drivers/Apache/Impala/ImpalaTestEnvironment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public override Dictionary<string, string> GetDriverParameters(ApacheTestConfigu

public override string GetInsertStatement(string tableName, string columnName, string? value) =>
string.Format("INSERT INTO {0} ({1}) SELECT {2};", tableName, columnName, value ?? "NULL");

public override SampleDataBuilder GetSampleDataBuilder() => throw new NotImplementedException();
}
}
4 changes: 1 addition & 3 deletions csharp/test/Drivers/Apache/Spark/ClientTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
namespace Apache.Arrow.Adbc.Tests.Drivers.Apache.Spark
{
/// <summary>
/// Class for testing the ADBC Client using the BigQuery ADBC driver.
/// Class for testing the ADBC Client using the Spark ADBC driver.
/// </summary>
/// <remarks>
/// Tests are ordered to ensure data is created for the other
Expand Down Expand Up @@ -72,7 +72,6 @@ public void CanClientExecuteUpdate()
affectedRows, // DELETE
];


Tests.ClientTests.CanClientExecuteUpdate(adbcConnection, TestConfiguration, queries, expectedResults);
}
}
Expand Down Expand Up @@ -149,7 +148,6 @@ public void VerifySchemaTablesWithNoConstraints()
}
}


[SkippableFact]
public void VerifySchemaTables()
{
Expand Down
2 changes: 1 addition & 1 deletion csharp/test/Drivers/Apache/Spark/DriverTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
namespace Apache.Arrow.Adbc.Tests.Drivers.Apache.Spark
{
/// <summary>
/// Class for testing the Snowflake ADBC driver connection tests.
/// Class for testing the Spark ADBC driver connection tests.
/// </summary>
/// <remarks>
/// Tests are ordered to ensure data is created for the other
Expand Down

0 comments on commit f1a3795

Please sign in to comment.