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

SDENT-167 #553

Open
wants to merge 1 commit into
base: snappy/master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -132,18 +132,22 @@ getProcedures40=\
#
getSchemas=\
SELECT SCHEMANAME AS TABLE_SCHEM, \
CAST(NULL AS VARCHAR(128)) AS TABLE_CATALOG \
FROM SYS.SYSSCHEMAS \
WHERE ((1=1) OR ? IS NOT NULL) \
AND SCHEMANAME LIKE ? \
\
UNION \
\
SELECT DISTINCT SCHEMANAME AS TABLE_SCHEM, \
CAST(NULL AS VARCHAR(128)) AS TABLE_CATALOG \
FROM SYS.HIVETABLES \
WHERE SCHEMANAME LIKE ? \
ORDER BY TABLE_SCHEM
CAST(NULL AS VARCHAR(128)) AS TABLE_CATALOG \
FROM SYS.SYSSCHEMAS \
WHERE ((1=1) OR ? IS NOT NULL) \
AND SCHEMANAME LIKE ? \
AND SCHEMANAME NOT IN ('NULLID', 'SNAPPY_HIVE_METASTORE','SQLJ','SYSCAT', \
'SYSCS_DIAG','SYSCS_UTIL','SYSFUN','SYSIBM','SYSPROC','SYSSTAT') \
\
UNION \
\
SELECT DISTINCT SCHEMANAME AS TABLE_SCHEM, \
CAST(NULL AS VARCHAR(128)) AS TABLE_CATALOG \
FROM SYS.HIVETABLES \
WHERE SCHEMANAME LIKE ? \
AND SCHEMANAME NOT IN ('NULLID', 'SNAPPY_HIVE_METASTORE','SQLJ','SYSCAT', \
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Neeraj,

I have added check for internal schema names in SYS.HIVETABLES query also. Is it really required ?

'SYSCS_DIAG','SYSCS_UTIL','SYSFUN','SYSIBM','SYSPROC','SYSSTAT') \
ORDER BY TABLE_SCHEM

# REMIND: presently table_type is a single char, we match JDBC
# recommendations closer and make it a more obvious word.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,17 @@ getSchemas=\
FROM SYS.SYSSCHEMAS \
WHERE ((1=1) OR ? IS NOT NULL) \
AND SCHEMANAME LIKE ? \
AND SCHEMANAME NOT IN ('NULLID', 'SNAPPY_HIVE_METASTORE','SQLJ','SYSCAT', \
'SYSCS_DIAG','SYSCS_UTIL','SYSFUN','SYSIBM','SYSPROC','SYSSTAT') \
\
UNION \
\
SELECT DISTINCT LOWER (SCHEMANAME) AS TABLE_SCHEM, \
CAST(NULL AS VARCHAR(128)) AS TABLE_CATALOG \
FROM SYS.HIVETABLES \
WHERE SCHEMANAME LIKE ? \
AND SCHEMANAME NOT IN ('NULLID', 'SNAPPY_HIVE_METASTORE','SQLJ','SYSCAT', \
'SYSCS_DIAG','SYSCS_UTIL','SYSFUN','SYSIBM','SYSPROC','SYSSTAT') \
ORDER BY TABLE_SCHEM

# REMIND: presently table_type is a single char, we match JDBC
Expand Down