ruowan opened a new issue, #1569:
URL: https://github.com/apache/arrow-adbc/issues/1569

   ### What happened?
   
   Snowflake getSchemaTable, it throw KeyNotFoundException  exception when 
calling ConvertArrowSchema.  You could reproduce this error by executing the 
query “SELECT * FROM PUBLIC.TEST_ALLTYPE_EMPTY” and `reader.GetSchemaTable()`.
   
   I also did some investigation. The exception is throwed from this line: 
https://github.com/apache/arrow-adbc/blob/fa8498f39fa69e01cdf2c5557e15cd4e6dc0fac2/csharp/src/Client/SchemaConverter.cs#L69.
 
   When the type is float, actually the metadata doesn’t contain precision and 
scale property, leading to the exception.  
   
   Error call stack:
      at System.ThrowHelper.ThrowKeyNotFoundException()
      at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
      at Apache.Arrow.Adbc.Client.SchemaConverter.ConvertArrowSchema(Schema 
schema, AdbcStatement adbcStatement, DecimalBehavior decimalBehavior) in 
Apache.Arrow.Adbc.Client\SchemaConverter.cs:line 41
      at Microsoft.Connectors.Snowflake.SnowflakeV2DataReader.GetSchemaTable() 
in 
D:\Repos\HybridDataIS\Source\SideBySideConnectors\SnowflakeV2\1.0.0.0\Source\SnowflakeV2DataReader.cs:line
 152
   
   
   ### How can we reproduce the bug?
   
   executing the query “SELECT * FROM PUBLIC.TEST_ALLTYPE_EMPTY” and 
`reader.GetSchemaTable()`.
   
   ### Environment/Setup
   
   _No response_


-- 
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]

Reply via email to