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

[BUG] DatabaseMetaData.getColumns(...) IS_GENERATEDCOLUMN value icorrect #1013

Closed
george-walker opened this issue Mar 27, 2019 · 2 comments
Closed
Assignees
Labels
Bug A bug in the driver. A high priority item that one can expect to be addressed quickly.

Comments

@george-walker
Copy link

george-walker commented Mar 27, 2019

Driver version

7.2.1.jre8

SQL Server version

Azure SQL

Client Operating System

Ubuntu 18.04

JAVA/JVM version

openjdk full version "1.8.0_191-8u191-b12-2ubuntu0.18.04.1-b12"

Table schema

CREATE TABLE product_list (
  id int auto_increment primary key,
  name NVARCHAR(100) NOT NULL,
  category NVARCHAR(50),
  business_unit NVARCHAR(50),
  quantity INTEGER,
  price FLOAT,
  realname NVARCHAR AS concat( business_unit, ':', name )
)

Problem description

  1. Expected behaviour:

https://docs.oracle.com/javase/7/docs/api/java/sql/DatabaseMetaData.html#getColumns(java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String)

The column IS_GENERATEDCOLUMN should return "YES" or "NO" as per JDBC

In the DDL above the column realname is a computed column

  1. Actual behaviour:

The column IS_GENERATEDCOLUMN return "1" or "0"

  1. Error message/stack trace:
  2. Any other details that can be helpful:
@george-walker george-walker added the Bug A bug in the driver. A high priority item that one can expect to be addressed quickly. label Mar 27, 2019
@peterbae
Copy link
Contributor

Hi @george-walker, thanks for contacting us about the issue. We've confirmed this issue, and will come up with a PR addressing this problem soon.

@rene-ye
Copy link
Member

rene-ye commented Jun 7, 2019

Hi @george-walker, #1016 has been merged. Closing the issue.

@rene-ye rene-ye closed this as completed Jun 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in the driver. A high priority item that one can expect to be addressed quickly.
Projects
None yet
Development

No branches or pull requests

3 participants