birschick-bq commented on code in PR #2018:
URL: https://github.com/apache/arrow-adbc/pull/2018#discussion_r1742828297
##########
csharp/src/Drivers/Apache/Hive2/HiveServer2Connection.cs:
##########
@@ -27,21 +26,21 @@
namespace Apache.Arrow.Adbc.Drivers.Apache.Hive2
{
- public abstract class HiveServer2Connection : AdbcConnection
+ internal abstract class HiveServer2Connection : AdbcConnection
Review Comment:
Reverted change from `public` back to `internal`.
##########
csharp/src/Drivers/Apache/Hive2/HiveServer2Connection.cs:
##########
@@ -27,21 +26,21 @@
namespace Apache.Arrow.Adbc.Drivers.Apache.Hive2
{
- public abstract class HiveServer2Connection : AdbcConnection
+ internal abstract class HiveServer2Connection : AdbcConnection
{
- const string userAgent = "AdbcExperimental/0.0";
+ internal const long BatchSizeDefault = 50000;
+ internal const int PollTimeMillisecondsDefault = 500;
+ private const string userAgent = "AdbcExperimental/0.0";
protected TOperationHandle? operationHandle;
- protected readonly IReadOnlyDictionary<string, string> properties;
- internal TTransport? transport;
- internal TCLIService.Client? client;
- internal TSessionHandle? sessionHandle;
+ internal TTransport? _transport;
+ private TCLIService.Client? _client;
private readonly Lazy<string> _vendorVersion;
private readonly Lazy<string> _vendorName;
- internal HiveServer2Connection(IReadOnlyDictionary<string, string>
properties)
+ public HiveServer2Connection(IReadOnlyDictionary<string, string>
properties)
Review Comment:
Changing `public` to `internal` for `internal` classes to make future
changes easier.
##########
csharp/src/Drivers/Apache/Thrift/Service/Rpc/Thrift/TBinaryColumn.cs:
##########
@@ -83,14 +84,14 @@ public TBinaryColumn DeepCopy()
values = new ArrowBuffer.Builder<byte>();
int offset = 0;
- offsetBuffer = new byte[(length + 1) * 4];
+ offsetBuffer = new byte[(length + 1) * IntSize];
var memory = offsetBuffer.AsMemory();
var typedMemory = Unsafe.As<Memory<byte>, Memory<int>>(ref
memory).Slice(0, length + 1);
for(int _i197 = 0; _i197 < length; ++_i197)
{
//typedMemory.Span[_i197] = offset;
- StreamExtensions.WriteInt32LittleEndian(offset,
memory.Span, _i197 * 4);
+ StreamExtensions.WriteInt32LittleEndian(offset,
memory.Span, _i197 * IntSize);
Review Comment:
Okay will create a follow-up to .NET 6+ support for
`BinaryPrimitives.WriteInt32LittleEndian`
##########
csharp/src/Drivers/Apache/Thrift/Service/Rpc/Thrift/TBinaryColumn.cs:
##########
@@ -83,14 +84,14 @@ public TBinaryColumn DeepCopy()
values = new ArrowBuffer.Builder<byte>();
int offset = 0;
- offsetBuffer = new byte[(length + 1) * 4];
+ offsetBuffer = new byte[(length + 1) * IntSize];
var memory = offsetBuffer.AsMemory();
var typedMemory = Unsafe.As<Memory<byte>, Memory<int>>(ref
memory).Slice(0, length + 1);
Review Comment:
Removed reference to `typedMemory`.
##########
csharp/src/Drivers/Apache/Spark/README.md:
##########
@@ -66,7 +69,34 @@ The following table depicts how the Spark ADBC driver
converts a Spark type to a
| USER_DEFINED | String | string |
| VARCHAR | String | string |
-\* Complex types are returned as strings<br>
+### Apache Spark over HTTP
+
+| Spark Type | Arrow Type | C# Type |
+| :--- | :---: | :---: |
+| ARRAY* | String | string |
+| BIGINT | Int64 | long |
+| BINARY | Binary | byte[] |
+| BOOLEAN | Boolean | bool |
+| CHAR | String | string |
+| DATE* | *String* | *string* |
+| DECIMAL* | *String* | *string* |
Review Comment:
Introduced option `data_type_conv` with value `none` to indicate that no
conversion should be done. Indicated future support for `scalar` to convert
date, decimal and timestamp types.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]