Currently metadata derived from JDBC API is provided in upper case. Which is
inconsistent with other means of getting metadata e.g. show tables.
With this PR we have added a new metadata_lc.property file which will return
metadata information in lower case.
This file will be used only when metadatacase.lower system property is set and when
query routing is enabled (i.e. only for external connections) . For internal
connection we will keep using existing metadata.propery file in order to
avoid changes in internal code which could be written with consideration of
upper case.
Following is the list of queries and respective fields which will be returned in
lower case:
getSchemas
TABLE_SCHEM
getTables
TABLE_SCHEM
TABLE_NAME
TABLE_TYPE
REMARKS
getColumns
TABLE_SCHEM
TABLE_NAME
COLUMN_NAME
TYPE_NAME
getTypeInfo
TYPE_NAME
LITERAL_PREFIX
LITERAL_SUFFIX
getTableTypes
TABLE_TYPE
Following VARCHAR fields from above queries are not converted in lower case:
getColumns
COLUMN_DEF as default value represents data which should be case sensitive
getTypeInfo
CREATE_PARAMS as the query contains some hard-coded values which are in
lowercase
Changes proposed in this pull request
Currently metadata derived from JDBC API is provided in upper case. Which is inconsistent with other means of getting metadata e.g.
show tables
.With this PR we have added a new
metadata_lc.property
file which will return metadata information in lower case.This file will be used only when
metadatacase.lower
system property is set and when query routing is enabled (i.e. only for external connections) . For internal connection we will keep using existingmetadata.propery
file in order to avoid changes in internal code which could be written with consideration of upper case.Following is the list of queries and respective fields which will be returned in lower case:
Following
VARCHAR
fields from above queries are not converted in lower case:Patch testing
Is precheckin with -Pstore clean?
yes after fixing the failures
Other PRs
https://github.com/SnappyDataInc/snappy-connectors/pull/40 https://github.com/SnappyDataInc/snappydata/pull/1538