You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "birschick-bq (via GitHub)" <gi...@apache.org> on 2024/05/27 20:22:14 UTC

[PR] feat(csharp/src/Drivers/Apache): improve GetObjects metadata returned for columns [arrow-adbc]

birschick-bq opened a new pull request, #1884:
URL: https://github.com/apache/arrow-adbc/pull/1884

   Improve the amount and quality of column metadata returned to the call to `GetObjects` where depth is `All` for the Spark driver.
   * Add an enumeration to provide identifiers for the Spark-specific data types (based on JDBC Types constants).
   * Improve metadata for column data types, precision and scale (for DECIMAL/NUMERIC types), etc.
   * Improve test to ensure new metadata is present.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(csharp/src/Drivers/Apache): improve GetObjects metadata returned for columns [arrow-adbc]

Posted by "birschick-bq (via GitHub)" <gi...@apache.org>.
birschick-bq commented on PR #1884:
URL: https://github.com/apache/arrow-adbc/pull/1884#issuecomment-2142644428

   @CurtHagenlocher Made the change to move the `using` line to the end.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(csharp/src/Drivers/Apache): improve GetObjects metadata returned for columns [arrow-adbc]

Posted by "CurtHagenlocher (via GitHub)" <gi...@apache.org>.
CurtHagenlocher commented on code in PR #1884:
URL: https://github.com/apache/arrow-adbc/pull/1884#discussion_r1622645025


##########
csharp/test/Drivers/Apache/Spark/DriverTests.cs:
##########
@@ -19,6 +19,7 @@
 using System.Collections.Generic;
 using System.Linq;
 using System.Threading.Tasks;
+using ColumnTypeId = Apache.Arrow.Adbc.Drivers.Apache.Spark.SparkConnection.ColumnTypeId;

Review Comment:
   If you say "sort usings" is this where the line ends up? I'm used to seeing aliasing "usings" at the end of the list of normal usings.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(csharp/src/Drivers/Apache): improve GetObjects metadata returned for columns [arrow-adbc]

Posted by "birschick-bq (via GitHub)" <gi...@apache.org>.
birschick-bq commented on code in PR #1884:
URL: https://github.com/apache/arrow-adbc/pull/1884#discussion_r1619582466


##########
csharp/test/Drivers/Apache/Spark/DriverTests.cs:
##########
@@ -37,6 +37,38 @@ namespace Apache.Arrow.Adbc.Tests.Drivers.Apache.Spark
     [TestCaseOrderer("Apache.Arrow.Adbc.Tests.Xunit.TestOrderer", "Apache.Arrow.Adbc.Tests")]
     public class DriverTests : SparkTestBase
     {
+        /// <summary>
+        /// Supported Spark data types as a subset of <see cref="SparkConnection.ColumnTypeId"/>
+        /// </summary>
+        private enum SupportedSparkDataType : short
+        {
+            ARRAY_TYPE = 2003,

Review Comment:
   Leaving all types in ColumnTypeId.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(csharp/src/Drivers/Apache): improve GetObjects metadata returned for columns [arrow-adbc]

Posted by "birschick-bq (via GitHub)" <gi...@apache.org>.
birschick-bq commented on PR #1884:
URL: https://github.com/apache/arrow-adbc/pull/1884#issuecomment-2142540387

   @CurtHagenlocher - If you have some time, could you review this PR. It resolves an issue for integration into ADBC data source.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(csharp/src/Drivers/Apache): improve GetObjects metadata returned for columns [arrow-adbc]

Posted by "CurtHagenlocher (via GitHub)" <gi...@apache.org>.
CurtHagenlocher merged PR #1884:
URL: https://github.com/apache/arrow-adbc/pull/1884


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(csharp/src/Drivers/Apache): improve GetObjects metadata returned for columns [arrow-adbc]

Posted by "ryan-syed (via GitHub)" <gi...@apache.org>.
ryan-syed commented on code in PR #1884:
URL: https://github.com/apache/arrow-adbc/pull/1884#discussion_r1617992186


##########
csharp/test/Drivers/Apache/Spark/DriverTests.cs:
##########
@@ -309,6 +341,39 @@ public void CanGetObjectsAll()
 
             Assert.True(columns != null, "Columns cannot be null");
             Assert.Equal(TestConfiguration.Metadata.ExpectedColumnCount, columns.Count);
+
+            for (int i = 0; i < columns.Count; i++)
+            {
+                // Verify column metadata is returned/consistent.
+                AdbcColumn column = columns[i];
+                Assert.Equal(i + 1, column.OrdinalPosition);
+                Assert.NotNull(column.Name);

Review Comment:
   redundant, as null is checked in the following line: `Assert.False(string.IsNullOrEmpty(column.Name));`



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(csharp/src/Drivers/Apache): improve GetObjects metadata returned for columns [arrow-adbc]

Posted by "birschick-bq (via GitHub)" <gi...@apache.org>.
birschick-bq commented on code in PR #1884:
URL: https://github.com/apache/arrow-adbc/pull/1884#discussion_r1619582954


##########
csharp/test/Drivers/Apache/Spark/DriverTests.cs:
##########
@@ -309,6 +341,39 @@ public void CanGetObjectsAll()
 
             Assert.True(columns != null, "Columns cannot be null");
             Assert.Equal(TestConfiguration.Metadata.ExpectedColumnCount, columns.Count);
+
+            for (int i = 0; i < columns.Count; i++)
+            {
+                // Verify column metadata is returned/consistent.
+                AdbcColumn column = columns[i];
+                Assert.Equal(i + 1, column.OrdinalPosition);
+                Assert.NotNull(column.Name);
+                Assert.False(string.IsNullOrEmpty(column.Name));
+                var types = Enum.GetValues(typeof(SupportedSparkDataType)).Cast<SupportedSparkDataType>();
+                Assert.Contains((SupportedSparkDataType)column.XdbcSqlDataType!, types);
+                Assert.NotNull(column.XdbcDataType);
+                Assert.Contains((SupportedSparkDataType)column.XdbcDataType!, types);
+                Assert.Equal(column.XdbcDataType, column.XdbcSqlDataType);
+                bool isDecimalType = column.XdbcDataType == (short)SupportedSparkDataType.DECIMAL_TYPE || column.XdbcDataType == (short)SupportedSparkDataType.NUMERIC_TYPE;
+                Assert.Equal(column.XdbcColumnSize.HasValue, isDecimalType);
+                Assert.Equal(column.XdbcDecimalDigits.HasValue, isDecimalType);
+                Assert.Equal(column.XdbcDataType, column.XdbcSqlDataType);
+                Assert.NotNull(column.Remarks);

Review Comment:
   I want the empty check.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(csharp/src/Drivers/Apache): improve GetObjects metadata returned for columns [arrow-adbc]

Posted by "birschick-bq (via GitHub)" <gi...@apache.org>.
birschick-bq commented on code in PR #1884:
URL: https://github.com/apache/arrow-adbc/pull/1884#discussion_r1619581962


##########
csharp/src/Drivers/Apache/Spark/SparkConnection.cs:
##########
@@ -402,23 +561,22 @@ public override IArrowArrayStream GetObjects(GetObjectsDepth depth, string? cata
                 {
                     throw new Exception(getTablesResp.Status.ErrorMessage);
                 }
+
+                IReadOnlyDictionary<string, int> columnMap = GetColumnIndexMap(getTablesResp.DirectResults.ResultSetMetadata.Schema.Columns);
                 TRowSet resp = getTablesResp.DirectResults.ResultSet.Results;
 
-                IReadOnlyList<string> catalogList = resp.Columns[0].StringVal.Values;
-                IReadOnlyList<string> schemaList = resp.Columns[1].StringVal.Values;
-                IReadOnlyList<string> tableList = resp.Columns[2].StringVal.Values;
-                IReadOnlyList<string> tableTypeList = resp.Columns[3].StringVal.Values;
+                IReadOnlyList<string> catalogList = resp.Columns[columnMap["TABLE_CAT"]].StringVal.Values;

Review Comment:
   Done



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(csharp/src/Drivers/Apache): improve GetObjects metadata returned for columns [arrow-adbc]

Posted by "birschick-bq (via GitHub)" <gi...@apache.org>.
birschick-bq commented on code in PR #1884:
URL: https://github.com/apache/arrow-adbc/pull/1884#discussion_r1622693991


##########
csharp/test/Drivers/Apache/Spark/DriverTests.cs:
##########
@@ -19,6 +19,7 @@
 using System.Collections.Generic;
 using System.Linq;
 using System.Threading.Tasks;
+using ColumnTypeId = Apache.Arrow.Adbc.Drivers.Apache.Spark.SparkConnection.ColumnTypeId;

Review Comment:
   Fixed. Thanks.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(csharp/src/Drivers/Apache): improve GetObjects metadata returned for columns [arrow-adbc]

Posted by "ryan-syed (via GitHub)" <gi...@apache.org>.
ryan-syed commented on code in PR #1884:
URL: https://github.com/apache/arrow-adbc/pull/1884#discussion_r1617974369


##########
csharp/src/Drivers/Apache/Spark/SparkConnection.cs:
##########
@@ -402,23 +561,22 @@ public override IArrowArrayStream GetObjects(GetObjectsDepth depth, string? cata
                 {
                     throw new Exception(getTablesResp.Status.ErrorMessage);
                 }
+
+                IReadOnlyDictionary<string, int> columnMap = GetColumnIndexMap(getTablesResp.DirectResults.ResultSetMetadata.Schema.Columns);
                 TRowSet resp = getTablesResp.DirectResults.ResultSet.Results;
 
-                IReadOnlyList<string> catalogList = resp.Columns[0].StringVal.Values;
-                IReadOnlyList<string> schemaList = resp.Columns[1].StringVal.Values;
-                IReadOnlyList<string> tableList = resp.Columns[2].StringVal.Values;
-                IReadOnlyList<string> tableTypeList = resp.Columns[3].StringVal.Values;
+                IReadOnlyList<string> catalogList = resp.Columns[columnMap["TABLE_CAT"]].StringVal.Values;

Review Comment:
   Consider creating string constants for columnMap keys.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(csharp/src/Drivers/Apache): improve GetObjects metadata returned for columns [arrow-adbc]

Posted by "ryan-syed (via GitHub)" <gi...@apache.org>.
ryan-syed commented on code in PR #1884:
URL: https://github.com/apache/arrow-adbc/pull/1884#discussion_r1617980732


##########
csharp/test/Drivers/Apache/Spark/DriverTests.cs:
##########
@@ -37,6 +37,38 @@ namespace Apache.Arrow.Adbc.Tests.Drivers.Apache.Spark
     [TestCaseOrderer("Apache.Arrow.Adbc.Tests.Xunit.TestOrderer", "Apache.Arrow.Adbc.Tests")]
     public class DriverTests : SparkTestBase
     {
+        /// <summary>
+        /// Supported Spark data types as a subset of <see cref="SparkConnection.ColumnTypeId"/>
+        /// </summary>
+        private enum SupportedSparkDataType : short
+        {
+            ARRAY_TYPE = 2003,

Review Comment:
   Should we use ARRAY_TYPE = `ColumnTypeId.ARRAY_TYPE`? In case of value update, it would be required at only one location?



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(csharp/src/Drivers/Apache): improve GetObjects metadata returned for columns [arrow-adbc]

Posted by "ryan-syed (via GitHub)" <gi...@apache.org>.
ryan-syed commented on code in PR #1884:
URL: https://github.com/apache/arrow-adbc/pull/1884#discussion_r1618000782


##########
csharp/test/Drivers/Apache/Spark/DriverTests.cs:
##########
@@ -309,6 +341,39 @@ public void CanGetObjectsAll()
 
             Assert.True(columns != null, "Columns cannot be null");
             Assert.Equal(TestConfiguration.Metadata.ExpectedColumnCount, columns.Count);
+
+            for (int i = 0; i < columns.Count; i++)
+            {
+                // Verify column metadata is returned/consistent.
+                AdbcColumn column = columns[i];
+                Assert.Equal(i + 1, column.OrdinalPosition);
+                Assert.NotNull(column.Name);
+                Assert.False(string.IsNullOrEmpty(column.Name));
+                var types = Enum.GetValues(typeof(SupportedSparkDataType)).Cast<SupportedSparkDataType>();
+                Assert.Contains((SupportedSparkDataType)column.XdbcSqlDataType!, types);
+                Assert.NotNull(column.XdbcDataType);
+                Assert.Contains((SupportedSparkDataType)column.XdbcDataType!, types);
+                Assert.Equal(column.XdbcDataType, column.XdbcSqlDataType);
+                bool isDecimalType = column.XdbcDataType == (short)SupportedSparkDataType.DECIMAL_TYPE || column.XdbcDataType == (short)SupportedSparkDataType.NUMERIC_TYPE;
+                Assert.Equal(column.XdbcColumnSize.HasValue, isDecimalType);
+                Assert.Equal(column.XdbcDecimalDigits.HasValue, isDecimalType);
+                Assert.Equal(column.XdbcDataType, column.XdbcSqlDataType);
+                Assert.NotNull(column.Remarks);

Review Comment:
   redundant, similar to above. There is `string.IsNullOrEmpty` check in the following line



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(csharp/src/Drivers/Apache): improve GetObjects metadata returned for columns [arrow-adbc]

Posted by "birschick-bq (via GitHub)" <gi...@apache.org>.
birschick-bq commented on code in PR #1884:
URL: https://github.com/apache/arrow-adbc/pull/1884#discussion_r1619582616


##########
csharp/test/Drivers/Apache/Spark/DriverTests.cs:
##########
@@ -309,6 +341,39 @@ public void CanGetObjectsAll()
 
             Assert.True(columns != null, "Columns cannot be null");
             Assert.Equal(TestConfiguration.Metadata.ExpectedColumnCount, columns.Count);
+
+            for (int i = 0; i < columns.Count; i++)
+            {
+                // Verify column metadata is returned/consistent.
+                AdbcColumn column = columns[i];
+                Assert.Equal(i + 1, column.OrdinalPosition);
+                Assert.NotNull(column.Name);

Review Comment:
   Removed



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(csharp/src/Drivers/Apache): improve GetObjects metadata returned for columns [arrow-adbc]

Posted by "birschick-bq (via GitHub)" <gi...@apache.org>.
birschick-bq commented on code in PR #1884:
URL: https://github.com/apache/arrow-adbc/pull/1884#discussion_r1619583308


##########
csharp/test/Drivers/Apache/Spark/DriverTests.cs:
##########
@@ -309,6 +341,39 @@ public void CanGetObjectsAll()
 
             Assert.True(columns != null, "Columns cannot be null");
             Assert.Equal(TestConfiguration.Metadata.ExpectedColumnCount, columns.Count);
+
+            for (int i = 0; i < columns.Count; i++)
+            {
+                // Verify column metadata is returned/consistent.
+                AdbcColumn column = columns[i];
+                Assert.Equal(i + 1, column.OrdinalPosition);
+                Assert.NotNull(column.Name);
+                Assert.False(string.IsNullOrEmpty(column.Name));
+                var types = Enum.GetValues(typeof(SupportedSparkDataType)).Cast<SupportedSparkDataType>();
+                Assert.Contains((SupportedSparkDataType)column.XdbcSqlDataType!, types);
+                Assert.NotNull(column.XdbcDataType);
+                Assert.Contains((SupportedSparkDataType)column.XdbcDataType!, types);
+                Assert.Equal(column.XdbcDataType, column.XdbcSqlDataType);
+                bool isDecimalType = column.XdbcDataType == (short)SupportedSparkDataType.DECIMAL_TYPE || column.XdbcDataType == (short)SupportedSparkDataType.NUMERIC_TYPE;
+                Assert.Equal(column.XdbcColumnSize.HasValue, isDecimalType);
+                Assert.Equal(column.XdbcDecimalDigits.HasValue, isDecimalType);
+                Assert.Equal(column.XdbcDataType, column.XdbcSqlDataType);
+                Assert.NotNull(column.Remarks);
+                Assert.True(string.IsNullOrEmpty(column.Remarks));

Review Comment:
   Want the check for empty.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(csharp/src/Drivers/Apache): improve GetObjects metadata returned for columns [arrow-adbc]

Posted by "ryan-syed (via GitHub)" <gi...@apache.org>.
ryan-syed commented on code in PR #1884:
URL: https://github.com/apache/arrow-adbc/pull/1884#discussion_r1617989436


##########
csharp/test/Drivers/Apache/Spark/DriverTests.cs:
##########
@@ -37,6 +37,38 @@ namespace Apache.Arrow.Adbc.Tests.Drivers.Apache.Spark
     [TestCaseOrderer("Apache.Arrow.Adbc.Tests.Xunit.TestOrderer", "Apache.Arrow.Adbc.Tests")]
     public class DriverTests : SparkTestBase
     {
+        /// <summary>
+        /// Supported Spark data types as a subset of <see cref="SparkConnection.ColumnTypeId"/>
+        /// </summary>
+        private enum SupportedSparkDataType : short
+        {
+            ARRAY_TYPE = 2003,

Review Comment:
   Also, do we need `SupportedSparkDataType`. Should `ColumnTypeId` consist of only supported types instead?



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(csharp/src/Drivers/Apache): improve GetObjects metadata returned for columns [arrow-adbc]

Posted by "ryan-syed (via GitHub)" <gi...@apache.org>.
ryan-syed commented on code in PR #1884:
URL: https://github.com/apache/arrow-adbc/pull/1884#discussion_r1617989436


##########
csharp/test/Drivers/Apache/Spark/DriverTests.cs:
##########
@@ -37,6 +37,38 @@ namespace Apache.Arrow.Adbc.Tests.Drivers.Apache.Spark
     [TestCaseOrderer("Apache.Arrow.Adbc.Tests.Xunit.TestOrderer", "Apache.Arrow.Adbc.Tests")]
     public class DriverTests : SparkTestBase
     {
+        /// <summary>
+        /// Supported Spark data types as a subset of <see cref="SparkConnection.ColumnTypeId"/>
+        /// </summary>
+        private enum SupportedSparkDataType : short
+        {
+            ARRAY_TYPE = 2003,

Review Comment:
   Also, do we need `SupportedSparkDataType`? Should `ColumnTypeId` consist of only supported types instead?



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(csharp/src/Drivers/Apache): improve GetObjects metadata returned for columns [arrow-adbc]

Posted by "birschick-bq (via GitHub)" <gi...@apache.org>.
birschick-bq commented on PR #1884:
URL: https://github.com/apache/arrow-adbc/pull/1884#issuecomment-2134018153

   @ryan-syed Please review if you have a chance.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(csharp/src/Drivers/Apache): improve GetObjects metadata returned for columns [arrow-adbc]

Posted by "ryan-syed (via GitHub)" <gi...@apache.org>.
ryan-syed commented on code in PR #1884:
URL: https://github.com/apache/arrow-adbc/pull/1884#discussion_r1618002230


##########
csharp/test/Drivers/Apache/Spark/DriverTests.cs:
##########
@@ -309,6 +341,39 @@ public void CanGetObjectsAll()
 
             Assert.True(columns != null, "Columns cannot be null");
             Assert.Equal(TestConfiguration.Metadata.ExpectedColumnCount, columns.Count);
+
+            for (int i = 0; i < columns.Count; i++)
+            {
+                // Verify column metadata is returned/consistent.
+                AdbcColumn column = columns[i];
+                Assert.Equal(i + 1, column.OrdinalPosition);
+                Assert.NotNull(column.Name);
+                Assert.False(string.IsNullOrEmpty(column.Name));
+                var types = Enum.GetValues(typeof(SupportedSparkDataType)).Cast<SupportedSparkDataType>();
+                Assert.Contains((SupportedSparkDataType)column.XdbcSqlDataType!, types);
+                Assert.NotNull(column.XdbcDataType);
+                Assert.Contains((SupportedSparkDataType)column.XdbcDataType!, types);
+                Assert.Equal(column.XdbcDataType, column.XdbcSqlDataType);
+                bool isDecimalType = column.XdbcDataType == (short)SupportedSparkDataType.DECIMAL_TYPE || column.XdbcDataType == (short)SupportedSparkDataType.NUMERIC_TYPE;
+                Assert.Equal(column.XdbcColumnSize.HasValue, isDecimalType);
+                Assert.Equal(column.XdbcDecimalDigits.HasValue, isDecimalType);
+                Assert.Equal(column.XdbcDataType, column.XdbcSqlDataType);
+                Assert.NotNull(column.Remarks);
+                Assert.True(string.IsNullOrEmpty(column.Remarks));

Review Comment:
   Should this be `Assert.False(string.IsNullOrEmpty(column.Remarks))` instead?



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org