Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SnowflakeLoggedFeatureNotSupportedException being thrown from getObject(int columnIndex, Class<T> type) after driver upgrade #1431

Closed
itaseskii opened this issue Jun 20, 2023 · 8 comments
Assignees
Labels
bug In-Progress Issue to track for internal purpose

Comments

@itaseskii
Copy link

itaseskii commented Jun 20, 2023

Please answer these questions before submitting your issue.
In order to accurately debug the issue this information is required. Thanks!

  1. What version of JDBC driver are you using?

3.13.30 (Issue starts appearing from 3.13.20 onwards)

  1. What operating system and processor architecture are you using?

Linux Debian x86_64

  1. What version of Java are you using?

Java 17

  1. What did you do?

In the Airbyte destination Snowflake connector we have upgraded the driver from 3.13.19 to 3.13.30 and have started getting net.snowflake.client.jdbc.SnowflakeLoggedFeatureNotSupportedException from resultSet.getObject(index, OffsetDateTime.class)

airbytehq/airbyte#25849

  1. What did you expect to see?

The object being returned as OffsetDateTime as previously without any errors.

  1. Can you set logging to DEBUG and collect the logs?

snowflake_jdbc0.log

  1. What is your Snowflake account identifier, if any? (Optional)
@itaseskii itaseskii added the bug label Jun 20, 2023
@sfc-gh-spanaite sfc-gh-spanaite self-assigned this Jun 23, 2023
@sfc-gh-spanaite sfc-gh-spanaite added the status-triage_needed This is a new issue, and initial triage is needed label Jun 23, 2023
@sfc-gh-spanaite
Copy link
Contributor

Hi @itaseskii , I don't see any changes in JDBC driver code that would cause this exception since we never supported getObject(int columnIndex, Class<T> type).

Can you do the same test using JDBC 3.13.19 and provide me the log?

@sfc-gh-spanaite sfc-gh-spanaite removed the status-triage_needed This is a new issue, and initial triage is needed label Jun 26, 2023
@sfc-gh-spanaite
Copy link
Contributor

Hi @itaseskii , did you had a chance to re-run the test with 3.13.19 as requested?

@sfc-gh-spanaite sfc-gh-spanaite added the In-Progress Issue to track for internal purpose label Jun 27, 2023
@itaseskii
Copy link
Author

Hey @sfc-gh-spanaite that was my conclusion as well. Making a comparison of the source code between 3.13.19 and 3.13.20 getObject(int columnIndex, Class<T> type) seemed unsupported in both versions. As an attachment I'm sending you the log file of both versions.

snowflake_jdbc0_3.13.19.log
snowflake_jdbc0_3.13.20.log

@sfc-gh-spanaite
Copy link
Contributor

sfc-gh-spanaite commented Jun 28, 2023

Hi @itaseskii , thanks for providing the logs but they only confirm my suspicion: you get exactly the same stack trace on both versions:

  • on 3.13.19:
{"timestamp":"1687901317779","message":{"type":"client_sql_exception","DriverType":"JDBC","DriverVersion":"3.13.19","SQLState":"0A000","Stacktrace":"net.snowflake.client.jdbc.SnowflakeLoggedFeatureNotSupportedException\n\t
 at net.snowflake.client.jdbc.SnowflakeBaseResultSet.getObject(SnowflakeBaseResultSet.java:1291)\n\t
 at com.zaxxer.hikari.pool.HikariProxyResultSet.getObject(HikariProxyResultSet.java)\n\t
 at io.airbyte.db.jdbc.AbstractJdbcCompatibleSourceOperations.getObject(AbstractJdbcCompatibleSourceOperations.java:229)\n\t
 at io.airbyte.db.jdbc.AbstractJdbcCompatibleSourceOperations.putTimestamp(AbstractJdbcCompatibleSourceOperations.java:135)\n\t
 at io.airbyte.db.jdbc.JdbcSourceOperations.copyToJsonField(JdbcSourceOperations.java:60)\n\t
  • on 3.13.20:
{"timestamp":"1687900297044","message":{"type":"client_sql_exception","DriverType":"JDBC","DriverVersion":"3.13.20","SQLState":"0A000","Stacktrace":"net.snowflake.client.jdbc.SnowflakeLoggedFeatureNotSupportedException\n\t
 at net.snowflake.client.jdbc.SnowflakeBaseResultSet.getObject(SnowflakeBaseResultSet.java:1291)\n\t
 at com.zaxxer.hikari.pool.HikariProxyResultSet.getObject(HikariProxyResultSet.java)\n\t
 at io.airbyte.db.jdbc.AbstractJdbcCompatibleSourceOperations.getObject(AbstractJdbcCompatibleSourceOperations.java:229)\n\t
 at io.airbyte.db.jdbc.AbstractJdbcCompatibleSourceOperations.putTimestampWithTimezone(AbstractJdbcCompatibleSourceOperations.java:239)\n\t
 at io.airbyte.db.jdbc.JdbcSourceOperations.copyToJsonField(JdbcSourceOperations.java:61)\n\t

To me this looks to be something coming from Airbyte since they use a getObject method with 2 args (in AbstractJdbcCompatibleSourceOperations.java) as you can see here.

@itaseskii
Copy link
Author

itaseskii commented Jun 28, 2023

Hey @sfc-gh-spanaite, that isn't the case in the integration tests. the tests with 3.13.19 are passing without any issue or SnowflakeLoggedFeatureNotSupportedException log.

Screenshot_20230628_172636

Initially I thought that it might be a different code path being executed between the versions but the error log that I have sent you shows the SnowflakeLoggedFeatureNotSupportedException being present in both files...

@sfc-gh-spanaite
Copy link
Contributor

@itaseskii Can you maybe give me a sample code of the tests you're running? I've tried reproducing from my side with both 3.13.19 and 3.13.20 and I get exactly the same stack trace and exception and the log looks identical.

The only change that I can see in 3.13.20 was to map timestamp_tz to java.sql.Type TIMESTAMP_WITH_TIMEZONE and update getTimestamp() in JSON result set to include the new timestamp_tz, but I wouldn't expect this to cause the issue.

Without a sample code for the integration test that's failing it will be hard to confirm if this is coming from our JDBC driver.

@sfc-gh-spanaite
Copy link
Contributor

@itaseskii Do you still have the issue and if yes can you provide me a sample code?

@sfc-gh-spanaite
Copy link
Contributor

Hi @itaseskii , I am closing this issue since I've not received any feedback from you. If you still have the issue feel free to open a new issue and provide a sample code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug In-Progress Issue to track for internal purpose
Projects
None yet
Development

No branches or pull requests

2 participants