-
Notifications
You must be signed in to change notification settings - Fork 170
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
JDBC DatabaseMetaData.getFunctionColumns error #1459
Comments
@sfc-gh-spanaite do you able to repro and make any progress? |
@sfc-gh-igarish I am not able to reproduce this. @wise-coders Can you provide a sample code that can reproduce the issue? Statement statement = con.createStatement();
statement.execute(
"create or replace function FUNC111(a number, b number)\n"
+ "returns NUMBER comment='multiply numbers' as 'a*b'");
String database = con.getCatalog();
String schema = con.getSchema();
DatabaseMetaData metaData = con.getMetaData();
ResultSet res = metaData.getFunctionColumns(database, schema, "FUNC111", "%");
res.next();
System.out.println("Database" + "\t" + "Schema" + "\t" + "Function");
System.out.println(res.getString(1) + "\t" + res.getString(2) + "\t" + res.getString(3)); and I am getting back: $ java -cp .:snowflake-jdbc-3.14.2.jar GithubIssue1459.java
Database Schema Function
SERGIU_TESTDB PUBLIC FUNC111 |
We found out that this happens for build-in functions and procedures. it seems that built in function (is_buildin = ‚Y‘) could not use „desc function“ But the build-in functions are listed by SELECT GET_DDL ( 'SCHEMA', '<schema_name>', true) |
This seems to be described as the same issue from 1510. |
I'll go ahead and close this one as well as 1510 has been closed. |
Calling 'SnowflakeDatabaseMetaData.getFunctionColumns' may throw an exception, even if the method gets the database and schema names as parameters.
The text was updated successfully, but these errors were encountered: