[GitHub] incubator-trafodion pull request #1336: jira TRAFODION-2731 Corrected a prob...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/1336 jira TRAFODION-2731 Corrected a problem related to phandle A previous change checked in for code cleanup was causing incorrect phandle to be generated. It was causing phoenix regressions tests to fail. That issue has now been fixed. You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_phandle_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/1336.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1336 commit 9e5fef0f08595142c9bbb4794a7435871b3e9d3b Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2017-12-12T02:07:13Z jira TRAFODION-2731 Corrected a problem related to phandle A previous change checked in for code cleanup was causing incorrect phandle to be generated. That has been fixed. ---
[GitHub] incubator-trafodion pull request #1333: JIRA TRAFODION-2834 Streamline suppo...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/1333 JIRA TRAFODION-2834 Streamline supported xn access modes More details in jira. traf DTM only supports 'read committed access' for selects and 'set transaction ' stmts. With this checkin, only those 2 options will be allowed. All other access options will return an error. Read uncommitted access will be treated as read committed. You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_traf_xn_deliver_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/1333.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1333 commit 6dd81240697f689ce26b93021d17d4f602044c77 Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2017-12-09T21:18:13Z JIRA TRAFODION-2834 Streamline supported xn access modes traf DTM only supports 'read committed access' for selects and 'set transaction ' stmts. With this checkin, only those 2 options will be allowed. All other access options will return an error. Read uncommitted access will be treated as read committed. ---
[GitHub] incubator-trafodion pull request #1322: regr fixes for hive and fullstack2
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/1322 regr fixes for hive and fullstack2 -- hive fix is for an earlier checkin related to java deallocation for sequence files -- fullstack2 is expected file update for release mode run You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_t23cc_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/1322.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1322 commit d101d90b06bf3c3cac3c60c2d0fd72ddf65f1342 Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2017-12-01T15:51:27Z regr fixes for hive and fullstack2 -- hive fix is for an earlier checkin related to java deallocation for sequence files -- fullstack2 is expected file update for release mode run ---
[GitHub] incubator-trafodion pull request #1317: JIRA TRAFODION-2731 CodeCleanup: Pha...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/1317 JIRA TRAFODION-2731 CodeCleanup: Phase 6. Cleanup obsolete/unused cqds You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_t23cc_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/1317.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1317 commit 665def4ff674d5020814f320cb3051f165beae6f Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2017-11-30T00:57:44Z JIRA TRAFODION-2731 CodeCleanup: Phase 6. Cleanup of obsolete/unused cqds. ---
[GitHub] incubator-trafodion pull request #1262: TRAFODION-2731 CodeCleanup: Phase 5....
Github user anoopsharma00 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/1262#discussion_r144393927 --- Diff: core/sql/common/Ipc.cpp --- @@ -4580,44 +4565,21 @@ IpcServerClass::IpcServerClass(IpcEnvironment *env, } if (allocationMethod_ == IPC_ALLOC_DONT_CARE) { -#if (defined(NA_GUARDIAN_IPC)) - // NA_WINNT is set and NA_GUARDIAN_IPC is set - // The standard method on NT is to create a Guardian process - // in order to run in an NT only or simulated environment we can set an environment - // variable to override that mechanism. - if (getenv("SQL_NO_NSK_LITE") == NULL) - { - allocationMethod_ = IPC_LAUNCH_GUARDIAN_PROCESS; - } - else - { - allocationMethod_ = IPC_LAUNCH_NT_PROCESS; - time_t tp; - time(); - nextPort_ = IPC_SQLESP_PORTNUMBER + tp % 1; // arbitrary - }; - -#else // NA_GUARDIAN_IPC - - // NA_WINNT is set and NA_GUARDIAN_IPC is NOT set - // The standard method on NT is to create an NT process - // We use socket based communication but launch the process ourself rather - // than using INETD. - // Eventually we will use nsk lite to create new processes and to - // communicate via the message system. - // in order to run in an NT only or simulated environment we can set an environment - // variable to override that mechanism. - if (getenv("SQL_NO_NSK_LITE") == NULL) - {allocationMethod_ = IPC_LAUNCH_GUARDIAN_PROCESS; - } - else - { - allocationMethod_ = IPC_LAUNCH_NT_PROCESS; + // NA_WINNT is set and NA_GUARDIAN_IPC is set + // The standard method on NT is to create a Guardian process + // in order to run in an NT only or simulated environment we can set an environment + // variable to override that mechanism. + if (getenv("SQL_NO_NSK_LITE") == NULL) --- End diff -- There are still some parts of code which use some of the NSK and NT constructs. They need to be looked at carefully before removing them. But yes, obvious obsolete references like the one you pointed out, will be removed in a subsequent checkin. ---
[GitHub] incubator-trafodion pull request #1262: TRAFODION-2731 CodeCleanup: Phase 5....
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/1262 TRAFODION-2731 CodeCleanup: Phase 5. Cleanup of Platform.h Removal of unneeded/unused entries from common/Platform.h and their usage from other files. Removal of some other defines that are no longer used. There might be a compilation error if an obsolete define is being used. If that happens, those defines need to be removed from the code. You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_t23cc_br2 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/1262.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1262 commit d496f359b0e4f293892c10479059c6db6bf3474d Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2017-10-11T20:05:32Z TRAFODION-2731 CodeCleanup: Phase 5. Cleanup of Platform.h Removal of unneeded/unused entries from Platform.h and their usage from other files. Removal of some other defines that are no longer used. There might be a compilation error if an obsolete define is being used. If that happens, those defines need to be removed. ---
[GitHub] incubator-trafodion pull request #1251: TRAFODION-2731 CodeCleanup: Phase 4....
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/1251 TRAFODION-2731 CodeCleanup: Phase 4. Removed legacy/obsolete warning pragmas You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_t23cc_pragmas_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/1251.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1251 commit 781d97e6ce89495e457a70e41dd1caa9b3b10599 Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2017-10-01T18:25:57Z TRAFODION-2731 CodeCleanup: Phase 4. Remove legacy/obsolete pragmas ---
[GitHub] incubator-trafodion pull request #1244: TRAFODION-2731 CodeCleanup: Phase 3....
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/1244 TRAFODION-2731 CodeCleanup: Phase 3. Remove LCOV directives This phase removes LCOV directives that were added a while back for code coverage. At that time, it was done to exclude code that should not be counted as part of codecoverage. Those directives are now being removed as they are incomplete, or do not cover all of code, or do not cover newer code, or cover obsolete/unused code, or are no longer relevant. Better way to increase code coverage is to increases testing so more code paths and features are covered. You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_t23cc_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/1244.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1244 commit 7a95e1da4f70eb3e29478e1126b7ebfcfb60b91a Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2017-09-20T14:41:28Z lcov: commit #1 commit 4fc2f0f0d880ff64283b612c0a7140bae4cf204a Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2017-09-25T17:40:12Z Merge remote branch 'origin/master' into ansharma_t23cc_br ---
[GitHub] incubator-trafodion pull request #1236: TRAFODION-2731 CodeCleanup: Phase 2:...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/1236 TRAFODION-2731 CodeCleanup: Phase 2: Remove obsolete code This phase handles the following: -- removed files: cli/rtdu.h, rtdu2.h, rtdu.cpp, rtdu.cpp executor/dmeasql.h executor/ExMeas.h, ExMeas.cpp executor/tempfile.h, .cpp executor/rcb.h executor/stubs.cpp, stubs2.cpp exp/srlversion.cpp exp/exp_space.h cli/VicKeyValuePair.h cli/CliDll.cpp cli/CliStubsStaticBuild.cpp cli/globalsrlversion.cpp cli/globalstubs.cpp cli/sqlciSRLStubs.cpp cli/test.cpp cli/privsrlversion.cpp common/SqlExpDllDefines.h common/SqlExportDllDefines.h sqlcat/enum.h sqlcat/ReadTableDef.h, cpp sqlcat/readRealArk.h, cpp sqlshare/catapirequest.* -- removed defines and code referencing them: -- NA_STD_NAMESPACE -- NA_NO_CMPCONTEXT -- NA_CATMAN_SIM, NA_CATMAN_SIM_FS -- common/purify.h -- DONT_USE_MATH_H -- NT_PORT -- NA_MSVC -- NA_NO_FRIENDS_WITH_TEMPLATE_REFS -- NA_FLEXBUILD -- NA_LINUX_SETENV -- removed multiple obsolete sqlci features and syntax: (report writer, MACL, Help, Simulators, Utils, MXCS mode, Help, and few others). -- removed following files in sqlci dir: CSInterface.h CharSetConstants.cpp CharSetConstants.h MsgCat.cpp MsgCat.h MxciEHCallBack.cpp MxciEHCallBack.h RWInterface.cpp RWInterface.h SqlciCSCmd.cpp SqlciCSCmd.h SqlciCSSimulator.cpp SqlciHelp.cpp SqlciRWCmd.cpp SqlciRWCmd.h SqlciRWSimulator.cpp SqlciUsage.cpp SqlciUtil.cpp SqlciUtil.h UtilInt.cpp UtilInt.h UtilMsg.cpp UtilMsg.h immudefs.cpp immudefs.h -- removed references to NT_PORT You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_t23cleanup_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/1236.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1236 commit b952c0d5f96f773155467249631622a79e0ca68e Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2017-09-15T00:13:37Z code cleanup, commit #1 commit 331fbd2aca3ac8938a8f6ead3c4b02687e562ee0 Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2017-09-17T20:15:18Z Merge remote branch 'origin/master' into ansharma_t23cleanup_br commit 62b45310c224be5c2e83de0ca5afbd7ad283166b Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2017-09-17T23:09:11Z TRAFODION-2731 CodeCleanup: Phase 2: Remove obsolete code This phase handles the following: -- removed files: cli/rtdu.h, rtdu2.h, rtdu.cpp, rtdu.cpp executor/dmeasql.h executor/ExMeas.h, ExMeas.cpp executor/tempfile.h, .cpp executor/rcb.h executor/stubs.cpp, stubs2.cpp exp/srlversion.cpp exp/exp_space.h cli/VicKeyValuePair.h cli/CliDll.cpp cli/CliStubsStaticBuild.cpp cli/globalsrlversion.cpp cli/globalstubs.cpp cli/sqlciSRLStubs.cpp cli/test.cpp cli/privsrlversion.cpp common/SqlExpDllDefines.h common/SqlExportDllDefines.h sqlcat/enum.h sqlcat/ReadTableDef.h, cpp sqlcat/readRealArk.h, cpp sqlshare/catapirequest.* -- removed defines and code referencing them: -- NA_STD_NAMESPACE -- NA_NO_CMPCONTEXT -- NA_CATMAN_SIM, NA_CATMAN_SIM_FS -- common/purify.h -- DONT_USE_MATH_H -- NT_PORT -- NA_MSVC -- NA_NO_FRIENDS_WITH_TEMPLATE_REFS -- NA_FLEXBUILD -- removed multiple obsolete sqlci features and syntax: (report writer, MACL, Help, Simulators, Utils, MXCS mode, Help, and few others). -- removed following files in sqlci dir: CSInterface.h CharSetConstants.cpp CharSetConstants.h MsgCat.cpp MsgCat.h MxciEHCallBack.cpp MxciEHCallBack.h RWInterface.cpp RWInterface.h SqlciCSCmd.cpp SqlciCSCmd.h SqlciCSSimulator.cpp SqlciHelp.cpp SqlciRWCmd.cpp SqlciRWCmd.h SqlciRWSimulator.cpp SqlciUsage.cpp SqlciUtil.cpp SqlciUtil.h UtilInt.cpp UtilInt.h UtilMsg.cpp UtilMsg.h immudefs.cpp immudefs.h ---
[GitHub] incubator-trafodion pull request #1226: TRAFODION-2731 CodeCleanup: Remove o...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/1226 TRAFODION-2731 CodeCleanup: Remove obsolete, legacy and unused code This phase handles the following: -- removal of code that dealt with: -- mpalias, NSK, MP, mploc, resource fork, rfork -- ARLIB, DISK, VOLUME, PFS, compiler version info -- interpretasrow/IAR, AuditImage, ExtractColumns functions -- ARKCMP_SINGLE_PROCESS and oneProcess() -- recompControl, remoteDefaults, rtdu, module -- latebind thru nsk defines, guardian names, nametype nsk -- SHADOW implementation -- MEASURE -- older sqlcat ReadTableDef -- DP2_MEMORY, DP2_SPACE, HGB_DP2_MEMORY_LIMIT -- internal cli methods no longer used by any caller Code within the following defines is removed if it is obsolete or the define itself is removed if that feature is always on: -- removed NA_EIDPROC -- removed SQLEXP_LIB_FUNC -- removed NA_CMPDLL -- removed SQ_PHANDLE_VERIFIER -- removed SQ_NEW_PHANDLE -- removed __EID -- removed ARKFS_OPEN -- removed STAND_ALONE -- removed __TANDEM -- removed NA_C89 -- removed NA_NSK -- removed SQLEXPORT_LIB_FUNC -- removed SQLCLI_LIB_FUNC -- removed CLI_PRIV_SRL -- removed PRIV_SRL -- removed NA_LINUX -- removed NA_HSC_LINUX -- removed NA_UNIX -- removed NA_WINNT -- removed HAVE_MMAP -- removed NA_NO_C_RUNTIME -- removed NA_DEBUG_C_RUNTIME(replaced with _DEBUG) -- removed NA_64BIT usage except in sqlcli.h -- removed dg64 -- removed SQLEXPORT_LIB -- removed NA_ARKFS -- removed NA_IEEE_FLOAT -- removed NA_GUARDIAN_MSG -- removed NA_HSC -- removed NA_TMFNOTYETSUPPORTED -- removed ERROR -- removed ERROR_STATE -- removed SQLERRORS_LIB_FUNC Contents of these files have been removed. Next checkin fill remove the files itself from git: executor/dmeasql.h executor/ExMeas.h, ExMeas.cpp executor/tempfile.h, .cpp executor/rcb.h executor/stubs.cpp, stubs2.cpp exp/srlversion.cpp cli/rtdu.h, rtdu2.h, rtdu.cpp, rtdu.cpp cli/VicKeyValuePair.h cli/CliDll.cpp cli/CliStubsStaticBuild.cpp cli/globalsrlversion.cpp cli/globalstubs.cpp cli/sqlciSRLStubs.cpp cli/test.cpp cli/privsrlversion.cpp common/SqlExpDllDefines.h common/SqlExportDllDefines.h sqlcat/enum.h sqlcat/ReadTableDef.h, cpp sqlcat/readRealArk.h, cpp You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_trafr23_deliver Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/1226.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1226 commit 1522c8cd0e33859c0671606364183f31d0d3902f Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2017-09-06T18:20:09Z TRAFODION-2731 CodeCleanup: Remove obsolete, legacy and unused code This phase handles the following: -- removal of code that dealt with: -- mpalias, NSK, MP, mploc, resource fork, rfork -- ARLIB, DISK, VOLUME, PFS, compiler version info -- interpretasrow/IAR, AuditImage, ExtractColumns functions -- ARKCMP_SINGLE_PROCESS and oneProcess() -- recompControl, remoteDefaults, rtdu, module -- latebind thru nsk defines, guardian names, nametype nsk -- SHADOW implementation -- MEASURE -- older sqlcat ReadTableDef -- DP2_MEMORY, DP2_SPACE, HGB_DP2_MEMORY_LIMIT -- internal cli methods no longer used by any caller Code within the following defines is removed if it is obsolete or the define itself is removed if that feature is always on: -- removed NA_EIDPROC -- removed SQLEXP_LIB_FUNC -- removed NA_CMPDLL -- removed SQ_PHANDLE_VERIFIER -- removed SQ_NEW_PHANDLE -- removed __EID -- removed ARKFS_OPEN -- removed STAND_ALONE -- removed __TANDEM -- removed NA_C89 -- removed NA_NSK -- removed SQLEXPORT_LIB_FUNC -- removed SQLCLI_LIB_FUNC -- removed CLI_PRIV_SRL -- removed PRIV_SRL -- removed NA_LINUX -- removed NA_HSC_LINUX -- removed NA_UNIX -- removed NA_WINNT -- removed HAVE_MMAP -- removed NA_NO_C_RUNTIME -- removed NA_DEBUG_C_RUNTIME(replaced with _DEBUG) -- removed NA_64BIT usage except in sqlcli.h -- removed dg64 -- removed SQLEXPORT_LIB -- removed NA_ARKFS -- removed NA_IEEE_FLOAT -- r
[GitHub] incubator-trafodion pull request #1222: fixed an issue that caused charsets/...
Github user anoopsharma00 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/1222#discussion_r136400798 --- Diff: core/sql/regress/charsets/TEST014 --- @@ -28,6 +28,11 @@ -- -- @@@ END COPYRIGHT @@@ +-- an existing bug causes process loop when infer_charset is ON --- End diff -- jira TRAFODION-2730 tracks this issue. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #1222: fixed an issue that caused charsets/...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/1222 fixed an issue that caused charsets/TEST014 to loop. an existing bug causes process loop when infer_charset is ON and query invalidation needs to remove entries from query cache. Until this bug is fixed, turn query_cache OFF. You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_regr Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/1222.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1222 commit 715ac7d09aaa86cc879de2a746b609efeb3d1f40 Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2017-08-31T17:08:34Z fixed an issue that caused charsets/TEST014 to loop. an existing bug causes process loop when infer_charset is ON and query invalidation needs to remove entries from query cache. Until this bug is fixed, turn query_cache OFF. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #1211: TRAFODION-2722 Change purgedata to u...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/1211 TRAFODION-2722 Change purgedata to use HBase truncate api Traf now uses HBase truncate api to delete all rows from a table and indexes, instead of dropping/recreating underlying HBase objects. A second change has also been added to fix a bug where compiler cache was being cleared whenever a DDL statement was issued. This change was added a while back before Query Invalidation(QI) feature was available and was not removed when QI was added. It has now been removed. You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_trafr23_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/1211.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1211 commit a3669571d6df1d6b6aa2ae8b521dd662f2a910a7 Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2017-08-18T15:07:32Z TRAFODION-2722 Change purgedata to use HBase truncate api Traf now uses HBase truncate api to delete all rows from a table and indexes, instead of dropping/recreating underlying HBase objects. A second change has also been added to fix a bug where compiler cache was being cleared whenever a DDL statement was issued. This change was added a while back before Query Invalidation(QI) feature was available and was not removed when QI was added. It has now been removed. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #1187: added known diff file seabase/DIFF03...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/1187 added known diff file seabase/DIFF031.KNOWN You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_explain_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/1187.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1187 commit ce51bafe9479235a4700e773eaa3cbc07c17a2d7 Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2017-07-20T14:17:02Z added known diff file seabase/DIFF031.KNOWN --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #1179: Few fixes, details listed below.
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/1179 Few fixes, details listed below. -- fix an issue where multiple values inserted from a list would return error but each value inserted on its own would succeed. ex: create table ts (a timestamp); insert into ts values ('2017-01-01 10:10:10'), ('2018-01-01 10:10:10'); -- sometimes errors returned from child during hive inserts were not being returned. That has been fixed. -- TRAFODION-2683 extension. added a 'p' (prune) option which would cleanse and filter unneeded explain output. This helps in reducing output especially for larger explains. Ex: >>explain option 'p' select * from dual; -- PLAN SUMMARY STATEMENT_NAME ... NOT NAMED STATEMENT select * from dual; --- NODE LISTING ROOT == SEQ_NO 2ONLY CHILD 1 DESCRIPTION fragment_id 0 parent_frag (none) fragment_type .. master xn_access_mode . read_only auto_query_retry ... enabled embedded_arkcmp used select_list %(0) input_variables %(0), %(0), %(0) VALUES SEQ_NO 1NO CHILDREN DESCRIPTION fragment_id 0 parent_frag (none) fragment_type .. master tuple_expr . %(0) --- SQL operation complete. >> You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_explain_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/1179.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1179 commit 5a244d532425a6a4aff19a5cd2cd6ab637ea9b0a Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2017-07-14T04:18:03Z Few fixes, details listed below. -- fix an issue where multiple values inserted from a list would return error but each value inserted on its own would succeed. ex: create table ts (a timestamp); insert into ts values ('2017-01-01 10:10:10'), ('2018-01-01 10:10:10'); -- sometimes errors returned from child during hive inserts were not being returned. That has been fixed. -- TRAFODION-2683 extension. added a 'p' (prune) option which would cleanse and filter unneeded explain output. This helps in reducing output especially for larger explains. Ex: >>explain option 'p' select * from dual; -- PLAN SUMMARY STATEMENT_NAME ... NOT NAMED STATEMENT select * from dual; --- NODE LISTING ROOT == SEQ_NO 2ONLY CHILD 1 DESCRIPTION fragment_id 0 parent_frag (none) fragment_type .. master xn_access_mode . read_only auto_query_retry ... enabled embedded_arkcmp used select_list %(0) input_variables %(0), %(0), %(0) VALUES SEQ_NO 1NO CHILDREN DESCRIPTION fragment_id 0 parent_frag (none) fragment_type .. master tuple_expr . %(0) --- SQL operation complete. >> --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #1173: TRAFODION-2683 add a new explain opt...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/1173 TRAFODION-2683 add a new explain option to mask variant fields in output --Syntax extension to cleanse and mask: Full explain: explain options 'c' select ... Formatted explain: explain options 'fc' select... Full explain on prepared statement: prepare s from select ... explain option 'c' s; --Masked fields will show up as "###" in explain output. --Both option and options keyword can be used in explain and showplan. -- explain option/options ... -- showplan option/options ... -- showplan can be used on explain statement. -- Here is an example of what the output will look like: >>explain option 'c' select * from dual; --- PLAN SUMMARY MODULE_NAME .. DYNAMICALLY COMPILED STATEMENT_NAME ... NOT NAMED PLAN_ID ### ROWS_OUT ... ### EST_TOTAL_COST . ### STATEMENT select * from dual; --- NODE LISTING ROOT SEQ_NO 2ONLY CHILD 1 REQUESTS_IN ### ROWS_OUT ... ### EST_OPER_COST .. ### EST_TOTAL_COST . ### DESCRIPTION max_card_est . ### fragment_id 0 parent_frag (none) fragment_type .. master statement_index 0 affinity_value ... ### max_max_cardinality### total_overflow_size### xn_access_mode . read_only xn_autoabort_interval0 auto_query_retry ... enabled plan_version ... 2,600 embedded_arkcmp used select_list %(0) input_variables %(0), %(0), %(0) VALUES SEQ_NO 1NO CHILDREN REQUESTS_IN ### ROWS_OUT ... ### EST_OPER_COST .. ### EST_TOTAL_COST . ### DESCRIPTION max_card_est . ### fragment_id 0 parent_frag (none) fragment_type .. master tuple_expr . %(0) --- SQL operation complete. >> You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_explain_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/1173.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1173 commit 2a520b5e75ebfb87672ddd2b1cf100062fad64c2 Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2017-07-11T19:09:53Z TRAFODION-2683 add a new explain option to mask variant fields in output --Syntax extension to cleanse and mask: explain options 'c' select ... explain options 'fc' select... prepare s from select ... explain option 'c' s; --Masked fields will show up as "###" in explain output. --Both option and options keyword can be used in explain and showplan. -- explain option/options ... -- showplan option/options ... -- showplan can be used on explain statement. -- Here is an example of what the output will look like: >>explain option 'c' select * from dual; --- PLAN SUMMARY MODULE_NAME .. DYNAMICALLY COMPILED STATEMENT_NAME ... NOT NAMED PLAN_ID ### ROWS_OUT ... ### EST_TOTAL_COST . ### STATEMENT select * from dual; --- NODE LISTING ROOT SEQ_NO 2ONLY CHILD 1 REQUESTS_IN ### ROWS_OUT ... ### EST_OPER_COST .. ### EST_TOTAL_COST . ### DESCRIPTION max_card_est . ### fragment_id 0 parent_frag (none) fragment_type .. master statement_index 0 affinity_value ... ### max_max_cardinality### total_overflow_size### xn_access_mode . read_only xn_autoabort_interval0 auto_query_retry ... enabled plan_version ... 2,600 embedded_arkcmp used select_list %(0) input_variables %(0), %(0), %(0) VALUES SEQ_NO 1NO CHILDREN REQUESTS_IN ### ROWS_OUT ... ### EST
[GitHub] incubator-trafodion pull request #1120: [TRAFODION-2584] Add support to regi...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/1120 [TRAFODION-2584] Add support to register hive schemas in traf MD This checkin extends jira TRAFODION-2584 to add support to register hive schemas(referred to as databases in hive) in trafodion metadata. Until now, only hive tables and views were registered. Registering hive schemas would allow certain operations, like granting/revoking privileges, to be done on a hive schema/database. Syntax to register/unregister hive schema -- register/unregister hive schema hive.sch; Syntax to show registred hive schemas -- get hive registered schemas in catalog trafodion "showddl schema hive.sch" will now show the ddl for hive database creation and whether this schema is registered. showddl and 'get tables in schema' will now return error if that schema doesn't exist. regress/hive/TEST007 has been extended with additional tests. You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_br_reghs Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/1120.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1120 commit 8e67ca9e49dffc0d1ed1d5e744c9607b1155adcb Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2017-06-15T15:14:27Z ra TRAFODION-2584 Add support to register hive schemas in traf MD This checkin extends jira TRAFODION-2584 to add support to register hive schemas(referred to as databases in hive) in trafodion metadata. Until now, only hive tables and views were registered. Registering hive schemas would allow certain operations, like granting/revoking privileges, to be done on a hive schema/database. Syntax to register/unregister hive schema -- register/unregister hive schema hive.sch; Syntax to show registred hive schemas -- get hive registered schemas in catalog trafodion "showddl schema hive.sch" will now show the ddl for hive database creation and whether this schema is registered. showddl and 'get tables in schema' will now return error if that schema doesn't exist. regress/hive/TEST007 has been extended with additional tests. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #1102: jira trafodion-2621, trafodion-2619 ...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/1102 jira trafodion-2621, trafodion-2619 + others -- trafodion-2621: add support to create like native hive or hbase tables -- trafodion-2619: support to_date format '/mm/dd' -- alter table drop column on a table with user indexes would sometime fail. That has been fixed. -- get schemas in a session where default catalog is set to hive, now correctly returns hive schemas -- update stats on hive tables succeeds -- update stats on hive view returns error as this operation is not supported You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/1102.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1102 commit b109e2cf5883f8e763af853ab6fad7ce7110d9e8 Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2017-05-24T23:20:11Z jira trafodion-2621, trafodion-2619 + others -- trafodion-2621: add support to create like native hive or hbase tables -- trafodion-2619: support to_date format '/mm/dd' -- alter table drop column on a table with user indexes would sometime fail. That has been fixed. -- get schemas in a session where default catalog is set to hive, now correctly returns hive schemas -- update stats on hive tables succeeds -- update stats on hive view returns error as this operation is not supported --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #1090: TRAFODION-2610 Register native HBase...
Github user anoopsharma00 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/1090#discussion_r116369158 --- Diff: core/sql/regress/seabase/EXPECTED030 --- @@ -7,7 +7,7 @@ 2016-03-01 --- 1 row(s) selected. ->>select to_date('03/01/2016', 'MM/DD/') from (values(1)) x(a); +>>select to_date('03/01/2016', 'mm/dd/') from (values(1)) x(a); --- End diff -- yes, all TO_DATE formats are now case-insensitive. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #1090: TRAFODION-2610 Register native HBase...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/1090 TRAFODION-2610 Register native HBase tables in traf MD plus HB Mapped table fixes -- support for registering hbase native cell/row format tables in traf MD Syntax: register [internal] hbase table [if not exists] unregister [internal] hbase table [if exists] -- support to get info related to registered hbase tables Syntax: get hbase registered table in catalog trafodion -- enhancements to HBase mapped tables and bug fixes -- disabling of creation of external tables on native hbase tables unless they are mapped tables -- support for case-insensitive format string in TO_DATE function (exp/exp_datetime.h) -- regress/seabase/TEST022 enhanced with additional tests You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_hbasereg_deliver_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/1090.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1090 commit 6ffe0b5b6097ab503965f40734ba7f0275892f01 Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2017-05-10T19:16:18Z TRAFODION-2610 Register native HBase tables in traf MD plus couple more -- support for registering hbase native cell/row format tables in traf MD Syntax: register [internal] hbase table [if not exists] unregister [internal] hbase table [if exists] -- support to get info related to registered hbase tables Syntax: get hbase registered table in catalog trafodion -- enhancements to HBase mapped tables and bug fixes -- disabling of creation of external tables on native hbase tables unless they are mapped tables -- support for case-insensitive format string in TO_DATE function (exp/exp_datetime.h) -- regress/seabase/TEST022 enhanced with additional tests --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #1071: compGeneral/TESTTOK2 fix
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/1071 compGeneral/TESTTOK2 fix updated sqlparser.y to handle REVERSE token correctly. You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_trafr22_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/1071.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1071 commit 6842a3aa56a82ec62d5b46269131f61445020146 Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2017-04-21T14:56:19Z compGeneral/TESTTOK2 fix --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #1069: JIRA 2485,2540,2582,2591, plus other...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/1069 JIRA 2485,2540,2582,2591, plus other bug fixes [TRAFODION-2485] Add support for REVERSE function (OperTypeEnum.h, exp/*, sqlparser.y, BindItemExpr.cpp, ItemExpr.cpp, SynthType.cpp, GenItemFunc.cpp) [TRAFODION-2540] Alter Drop column on table with identity "generated always" fails (file CmpSeabaseDDLtable.cpp) [TRAFODION-2582] "timestamp - timestamp" returns "days" instead of "seconds" (file: BindItemExpr.cpp) [TRAFODION-2591] Create index on added column returns incorrect results. (file generator/GenRelScan.cpp) Bug: Invalid "set transaction" stmt syntax no longer causes assertion failure or abend. An error is issued instead. (file BindRelExpr.cpp) Bug: Hive inserts with mismatched tgt/src datatypes would sometimes do not insert or insert incorrect values. (file GenFastTransport.cpp) Bug: an error indication is now returned if buildEncodeTree method is called to encode a "NULL" value for a non-null column. (file EncodedKeyValue.cpp) hive/TEST007 now does initialize auth and register user You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_trafr22_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/1069.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1069 commit a7148eb1e79e181c0a8ab4d9bfd60bf457d1dd6c Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2017-04-19T23:35:39Z JIRA 2485,2540,2582,2591, plus other bug fixes [TRAFODION-2485] Add support for REVERSE function (OperTypeEnum.h, exp/*, sqlparser.y, BindItemExpr.cpp, ItemExpr.cpp, SynthType.cpp, GenItemFunc.cpp) [TRAFODION-2540] Alter Drop column on table with identity "generated always" fails (file CmpSeabaseDDLtable.cpp) [TRAFODION-2582] "timestamp - timestamp" returns "days" instead of "seconds" (file: BindItemExpr.cpp) [TRAFODION-2591] Create index on added column returns incorrect results. (file generator/GenRelScan.cpp) Bug: Invalid "set transaction" stmt syntax no longer causes assertion failure or abend. An error is issued instead. (file BindRelExpr.cpp) Bug: Hive inserts with mismatched tgt/src datatypes would sometimes do not insert or insert incorrect values. (file GenFastTransport.cpp) Bug: an error indication is now returned if buildEncodeTree method is called to encode a "NULL" value for a non-null column. (file EncodedKeyValue.cpp) hive/TEST007 now does initialize auth and register user --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #1066: [TRAFODION-2584] Add support to regi...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/1066 [TRAFODION-2584] Add support to register hive objects in traf metadata Syntax: register hive table/view [if not exists] [cascade] unregister hive table/view [if exists] [cascade] cascade option: register/unregister all underlying objects that are part of the specified view update statistics, grant/revoke, traf views or external table creation on hive objects will automatically and internally register those objects in trafodion metadata. invoke/showddl will show if this object is registered and whether that registration was internal or explicit. Get command extensions: get hive registered tables/view/objects in catalog trafodion; get hive external tables in catalog trafodion; Cleanup command extensions: cleanup metadata command will clean up inconsistent hive objects (underlying hive object is missing but object is registered or an external table exists) cleanup [hive table | hive view] on ; Existing hive objects that had implicit or explicit external tables created prior to this checkin will have no change in behavior. ObjectUID of those external tables will continue to be used for relevant operations. One can drop those external tables and explicitly register them, or a subsequent operation(upd stats, grant, etc) that needs objectUID will automatically register them. minor changes based on review comments of previous checkin get all objects command on hive metadata no longer fails. get views on objects return 3-part name that could be used to differentiate between a traf and hive view. regress/hive/TEST007 has been extended. TBD: Add register/unregister privileges You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_hivereg_br_deliver Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/1066.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1066 commit 9c58649f930a799f03a2703d012371e4e66fa1a2 Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2017-04-14T19:38:18Z [TRAFODION-2584] Add support to register hive objects in traf metadata Syntax: register hive table/view [if not exists] [cascade] unregister hive table/view [if exists] [cascade] cascade option: register/unregister all underlying objects that are part of the specified view update statistics, grant/revoke, traf views or external table creation on hive objects will automatically and internally register those objects in trafodion metadata. invoke/showddl will show if this object is registered and whether that registration was internal or explicit. Get command extensions: get hive registered tables/view/objects in catalog trafodion; get hive external tables in catalog trafodion; Cleanup command extensions: cleanup metadata command will clean up inconsistent hive objects (underlying hive object is missing but object is registered or an external table exists) cleanup [hive table | hive view] on ; Existing hive objects that had implicit or explicit external tables created prior to this checkin will have no change in behavior. ObjectUID of those external tables will continue to be used for relevant operations. One can drop those external tables and explicitly register them, or a subsequent operation(upd stats, grant, etc) that needs objectUID will automatically register them. minor changes based on review comments of previous checkin get all objects command on hive metadata no longer fails. get views on objects return 3-part name that could be used to differentiate between a traf and hive view. regress/hive/TEST007 has been extended. TBD: Add register/unregister privileges --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #1009: Various fixes, details below
Github user anoopsharma00 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/1009#discussion_r106193917 --- Diff: core/sql/generator/GenRelMisc.cpp --- @@ -3045,8 +3045,11 @@ short Sort::generateTdb(Generator * generator, CostScalar bufferSize = getDefault(GEN_SORT_MAX_BUFFER_SIZE); - ULng32 bufferSize_as_ulong = -(ULng32)(MINOF(CostScalar(UINT_MAX), bufferSize)).getValue(); + UInt32 bufferSize_as_ulong = --- End diff -- Will change the variable name for a later checkin. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #1009: Various fixes, details below
Github user anoopsharma00 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/1009#discussion_r106193976 --- Diff: core/sql/regress/seabase/EXPECTED031 --- @@ -888,6 +960,143 @@ CREATE INDEX T031T1I1 ON TRAFODION.SCH.T031T1 --- SQL operation complete. >> +>>-- purgedata of table with delimited name +>>drop table if exists "tT"; + +--- SQL operation complete. +>>create table "tT" (a int); + +--- SQL operation complete. +>>purgedata "tT"; + +--- SQL operation complete. +>> +>>-- group by rollup would sometimes crash compiler. +>>drop table if exists mytable; + +--- SQL operation complete. +>>create table mytable(a char(10), b char(10), c int, d int); + +--- SQL operation complete. +>>insert into mytable values ++>('A1', 'B1', 1, 1), ++>('A1', 'B1', 1, 2), ++>('A1', 'B1', 2, 3), ++>('A1', 'B1', 2, 4), ++>('A1', 'B2', 3, 5), ++>('A1', 'B2', 3, 6), ++>('A1', 'B2', 4, 7), ++>('A1', 'B2', 4, 8), ++>('A2', 'B3', 5, 9), ++>('A2', 'B3', 5, 10), ++>('A2', 'B3', 6, 11), ++>('A2', 'B3', 6, 12), ++>('A2', 'B4', 7, 13), ++>('A2', 'B4', 7, 14), ++>('A2', 'B4', 8, 15), ++>('A2', 'B4', 8, 16); + +--- 16 row(s) inserted. +>>select a, b, c, sum(d) as newcol from mytable where a in ('A1') ++> group by(a, b, c); + +A B CNEWCOL +-- -- --- + +A1 B11 3 +A1 B2311 +A1 B2415 +A1 B12 7 + +--- 4 row(s) selected. +>>select a, b, c, sum(d) as newcol from mytable where d > 5 ++> group by rollup(a, b, c); + +A B CNEWCOL +-- -- --- + +A1 B23 6 +A1 B2415 +A1 B2?21 +A1 ? ?21 +A2 B3519 +A2 B3623 +A2 B3?42 +A2 B4727 +A2 B4831 +A2 B4?58 +A2 ? ? 100 +? ? ? 121 + +--- 12 row(s) selected. +>>select a, b, c, sum(d) as newcol from mytable where a in ('A1') ++> group by rollup(a, b, c); + +A B CNEWCOL +-- -- --- + +A1 B11 3 +A1 B12 7 +A1 B1?10 +A1 B2311 +A1 B2415 +A1 B2?26 +A1 B3519 +A1 B3623 +A1 B3?42 +A1 B4727 +A1 B4831 +A1 B4?58 +A1 ? ? 136 +A1 ? ? 136 --- End diff -- You are right, this is an existing bug. For a statement of the form: select a, sum(a) from t where a = 1 group by rollup (a) the VEG transformation replaces the 'a' in select list with '1' and that causes that column to not return a null('?') as part of the final rollup group. We probably need to have VEG transformation use the column 'a' instead of '1'. Will file a separate jira for this case. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #1009: Various fixes, details below
Github user anoopsharma00 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/1009#discussion_r106193931 --- Diff: core/sql/sqlcomp/nadefaults.cpp --- @@ -5936,8 +5937,39 @@ enum DefaultConstants NADefaults::validateAndInsert(const char *attrName, } break; - default: break; - } + // max char col length is 10M (10485760). --- End diff -- this is an obsolete comment. We used to support upto 10M but now increased it to 16M. will fix it for a later checkin. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #1009: Various fixes, details below
Github user anoopsharma00 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/1009#discussion_r106193843 --- Diff: core/sql/generator/GenRelGrby.cpp --- @@ -105,9 +105,13 @@ short GroupByAgg::genAggrGrbyExpr(Generator * generator, ValueId valId; // find the number of aggregate and groupby entries - ULng32 numAttrs -= ((NOT aggregateExpr.isEmpty() ) ? aggregateExpr.entries() : 0) -+ ((NOT groupExpr.isEmpty() ) ? groupExpr.entries() : 0); + ULng32 numAttrs = 0; + if (NOT aggregateExpr.isEmpty()) +numAttrs += aggregateExpr.entries(); + if (isRollup() && (NOT rollupGroupExprList.isEmpty())) +numAttrs += rollupGroupExprList.entries(); + else if (NOT groupExpr.isEmpty()) --- End diff -- that is correct. Only one of 'group by' or 'group by rollup' can be used. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #1009: Various fixes, details below
Github user anoopsharma00 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/1009#discussion_r106193810 --- Diff: core/sql/executor/ExExeUtilGet.cpp --- @@ -266,6 +266,12 @@ static const QueryString getComponentPrivileges[] = {" ; "} }; +static const QueryString getCatalogsQuery[] = +{ + {" select * from (values ('TRAFODION'), ('HIVE')) "}, --- End diff -- Currently, trafodion and hive are true catalogs that can be traversed through DBMgr or GET statements. Details about their contents (schemas, tables, etc) can be returned. 'hbase' is not really a catalog, it is the first part of a 3-part name used to access native hbase tables. We can think about it if it makes sense to treat it as a catalog. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #1009: Various fixes, details below
Github user anoopsharma00 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/1009#discussion_r106193496 --- Diff: core/sql/common/CharType.cpp --- @@ -752,16 +752,21 @@ NABoolean CharType::isCharSetAndCollationComboOK() const // --- // Equality comparison // --- +NABoolean CharType::compareCharAttrs(const NAType& other) const +{ --- End diff -- By the time this method is called, it has already gone through the test of validating that 'this' and 'other' are part of same class. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #1009: Various fixes, details below
Github user anoopsharma00 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/1009#discussion_r106193525 --- Diff: core/sql/common/CharType.cpp --- @@ -967,6 +972,28 @@ SQLVarChar::SQLVarChar(const CharLenInfo & maxLenInfo, {} // --- +// Equality comparison +// --- +NABoolean SQLVarChar::operator==(const NAType& other) const +{ + NABoolean compResult = FALSE; // false, failed. true, passed. + + // if this or other was originally a hive string type, then + // do not compare lengths. + if ((wasHiveString()) || + ((other.getTypeName() == LiteralVARCHAR) && + (((SQLVarChar&)other).wasHiveString( --- End diff -- literalVARCHAR is used for all sql varchar datatypes. The bytesPerChar and character set parameters to the char classes defined in common/CharType.h determine what kind of char datatype it is. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #1009: Various fixes, details below
Github user anoopsharma00 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/1009#discussion_r106193485 --- Diff: core/sql/bin/SqlciErrors.txt --- @@ -1198,7 +1198,7 @@ $1~String1 4126 42000 9 BEGINNER MAJOR DBADMIN The row value constructors in a VALUES clause must be of equal degree. 4127 42000 9 BEGINNER MAJOR DBADMIN Type $0~String0 cannot be assigned to type $1~String1. 4128 42000 9 BEGINNER MAJOR DBADMIN Default volume and subvolume information could not be retrieved from =_DEFAULTS define - DEFINEINFO error $0~int0. -4129 Z 9 BEGINNER MAJOR DBADMIN The character-typed result of the function $0~String0 is longer than 32768 octets. +4129 Z 9 BEGINNER MAJOR DBADMIN The character-typed result of the function $0~String0 is longer than max supported size. --- End diff -- will fix this for a later checkin. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #1009: Various fixes, details below
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/1009 Various fixes, details below -- max length limited to 16777216 bytes (16M) for char cols and functions (repeat, concat). (optimizer/SynthType.cpp, common/ComSmallDefs.h, sqlcomp/nadefaults.cpp) -- previous max length change requires adding of a new hbase property called hbase.client.keyvalue.maxsize so large key/values could be handled in hbase cell. Following scripts have been updated to handle that. (sqf/sql/scripts/install_local_hadoop, install/ambari-installer/traf-mpack/common-services/TRAFODION/2.1/ service_advisor.py install/installer/traf_hortonworks_mods install/python-installer/configs/mod_cfgs.json) Developers can also update hbase-site.xml with this property if they dont want to reinstall local hadoop. hbase.client.keyvalue.maxsize 0 -- while accessing a hive table as an external table, the hive table and corresponding external table definitions are validated to be the same. This validates that corresponding columns have the same data attributes (type, length, scale, etc). This check causes failures if hive column is of 'string' datatype. That is because hive 'string' column length can be changed by a cqd but the corresponding external table has predefined length set when the table is created. The validation check now ignores the length attribute if the hive column is of 'string' datatype. (optimizer/BindRelExpr.cpp, common/CharType.*, NAType.*) -- data moved into direct buffer would sometimes cause overflow and crash. The max direct buffer length used to send/retrieve hbase data is now limited to 1G (executor/ExHbaseAccess.cpp) -- errors during vsbb upsert are now handled correctly (executor/ExHbaseIUD.cpp) -- support for GET CATALOGS command (generator/GenRelExeUtil.cpp, executor/ExExeUtilGet.cpp) -- An incorrect computation would sometimes cause group by rollup to crash compiler in NAHeap::unlinkLargeFragment() (generator/GenRelGrby.cpp) -- sort of a large row that exceeded sort pre-set buffer size would crash if the row size exceeded the max buffer size. That has been fixed by allocating space for atleast one row. (generator/GenRelMisc.cpp) -- purgedata on a delimited name was failing. That has been fixed. (optimizer/RelExeUtil.h) -- regress/tools/runregr_privs1/privs2 fixed to handle running of subset of tests -- regress/seabase/TEST031 updated with new tests You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_trafr21_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/1009.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1009 commit 8aa532330e4dbf316a09817a033292c85cb02c4e Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2017-03-14T20:16:08Z Various fixes, details below -- max length limited to 16777216 bytes (16M) for char cols and functions (repeat, concat). (optimizer/SynthType.cpp, common/ComSmallDefs.h, sqlcomp/nadefaults.cpp) -- previous max length change requires adding of a new hbase property called hbase.client.keyvalue.maxsize so large key/values could be handled in hbase cell. Following scripts have been updated to handle that. (sqf/sql/scripts/install_local_hadoop, install/ambari-installer/traf-mpack/common-services/TRAFODION/2.1/ service_advisor.py install/installer/traf_hortonworks_mods install/python-installer/configs/mod_cfgs.json) Developers can also update hbase-site.xml with this property if they dont want to reinstall local hadoop. hbase.client.keyvalue.maxsize 0 -- while accessing a hive table as an external table, the hive table and corresponding external table definitions are validated to be the same. This validates that corresponding columns have the same data attributes (type, length, scale, etc). This check causes failures if hive column is of 'string' datatype. That is because hive 'string' column length can be changed by a cqd but the corresponding external table has predefined length set when the table is created. The validation check now ignores the length attribute if the hive column is of 'string' datatype. (optimizer/BindRelEx
[GitHub] incubator-trafodion pull request #979: TRAFODION-2498 Add support to run hiv...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/979 TRAFODION-2498 Add support to run hive stmts from traf interface Syntax: process hive statement ''; : hive statement starting with create/drop/alter/truncate. These are the only stmts currently supported. Ex: >>process hive statement 'create database trafsch'; will create hive database 'trafsch' >>process hive statement 'create table trafsch.t (a int)'; will create hive table 't' in hive schema 'trafsch'. 'process hive statment ..' could be issued from any traf interface (sqlci/trafci/jdbc...) You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_hivesql_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/979.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #979 commit e9389fa010c031669e97385f264d758043b9e4ac Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2017-02-24T22:34:09Z TRAFODION-2498 Add support to run hive stmts from traf interface Syntax: process hive statement ''; : hive statement starting with create/drop/alter/truncate. These are the only stmts currently supported. Ex: >>process hive statement 'create database trafsch'; will create hive database 'trafsch' >>process hive statement 'create table trafsch.t (a int)'; will create hive table 't' in hive schema 'trafsch'. 'process hive statment ..' could be issued from any traf interface (sqlci/trafci/jdbc...) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #976: TRAFODION-2492 Support for native hiv...
Github user anoopsharma00 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/976#discussion_r102809220 --- Diff: core/sql/optimizer/NATable.cpp --- @@ -5008,541 +5009,546 @@ NABoolean createNAFileSets(TrafDesc * table_desc /*IN*/, } if (table_desc->tableDesc()->isInMemoryObject()) - { - setInMemoryObjectDefn( TRUE ); - } + { + setInMemoryObjectDefn( TRUE ); + } if (table_desc->tableDesc()->isDroppable()) - { - setDroppableTable( TRUE ); - } + { + setDroppableTable( TRUE ); + } if (corrName.isExternal()) - { - setIsExternalTable(TRUE); - } + { + setIsExternalTable(TRUE); + } if (qualifiedName_.getQualifiedNameObj().isHistograms() || qualifiedName_.getQualifiedNameObj().isHistogramIntervals()) - { - setIsHistogramTable(TRUE); - } + { + setIsHistogramTable(TRUE); + } - insertMode_ = table_desc->tableDesc()->insertMode(); + insertMode_ = table_desc->tableDesc()->insertMode(); - setRecordLength(table_desc->tableDesc()->record_length); - // - // Add timestamp information. - // - createTime_ = table_desc->tableDesc()->createTime; - redefTime_ = table_desc->tableDesc()->redefTime; - cacheTime_ = table_desc->tableDesc()->cacheTime; + setRecordLength(table_desc->tableDesc()->record_length); + // + // Add timestamp information. + // + createTime_ = table_desc->tableDesc()->createTime; + redefTime_ = table_desc->tableDesc()->redefTime; + cacheTime_ = table_desc->tableDesc()->cacheTime; - catalogUID_ = table_desc->tableDesc()->catUID; - schemaUID_ = table_desc->tableDesc()->schemaUID; - objectUID_ = table_desc->tableDesc()->objectUID; + catalogUID_ = table_desc->tableDesc()->catUID; + schemaUID_ = table_desc->tableDesc()->schemaUID; + objectUID_ = table_desc->tableDesc()->objectUID; - // Set the objectUID_ for hbase Cell and Row tables, if the table has - // been defined in Trafodion use this value, otherwise, set to 0 - if (isHbaseCell_ || isHbaseRow_) -{ - if ( !fetchObjectUIDForNativeTable(corrName) ) -return; + // Set the objectUID_ for hbase Cell and Row tables, if the table has + // been defined in Trafodion use this value, otherwise, set to 0 + if (isHbaseCell_ || isHbaseRow_) + { + if ( !fetchObjectUIDForNativeTable(corrName) ) + return; - if (objectUID_ > 0 ) -setHasExternalTable(TRUE); -} + if (objectUID_ > 0 ) + setHasExternalTable(TRUE); + } - if (table_desc->tableDesc()->owner) -{ - Int32 userInfo (table_desc->tableDesc()->owner); - owner_ = userInfo; -} - if (table_desc->tableDesc()->schemaOwner) -{ - Int32 schemaUser(table_desc->tableDesc()->schemaOwner); - schemaOwner_ = schemaUser; -} + if (table_desc->tableDesc()->owner) + { + Int32 userInfo (table_desc->tableDesc()->owner); + owner_ = userInfo; + } + if (table_desc->tableDesc()->schemaOwner) + { + Int32 schemaUser(table_desc->tableDesc()->schemaOwner); + schemaOwner_ = schemaUser; + } - objectType_ = table_desc->tableDesc()->objectType(); - partitioningScheme_ = table_desc->tableDesc()->partitioningScheme(); + objectType_ = table_desc->tableDesc()->objectType(); + partitioningScheme_ = table_desc->tableDesc()->partitioningScheme(); - // Set up privs - if ((corrName.getSpecialType() == ExtendedQualName::SG_TABLE) || - (!(corrName.isSeabaseMD() || corrName.isSpecialTable( + // Set up privs + if ((corrName.getSpecialType() == ExtendedQualName::SG_TABLE) || + (!(corrName.isSeabaseMD() || corrName.isSpecialTable( getPrivileges(table_desc->tableDesc()->priv_desc); - if ((table_desc->tableDesc()->objectFlags & SEABASE_OBJECT_IS_EXTERNAL_HIVE) != 0 || - (table_desc->tableDesc()->objectFlags & SEABASE_OBJECT_IS_EXTERNAL_HBASE) != 0) -setIsExternalTable(TRUE); - - if (CmpSeabaseDDL::isMDflagsSet - (table_desc->tableDesc()->tablesFlags, MD_TABLES_HIVE_EXT_COL_ATTRS)) -setHiveExtColAttrs(TRUE); - if (CmpSeabaseDDL::isMDflagsSet - (table_desc->tableDesc()->tablesFlags, MD_TABLES_HIVE_EXT_KEY_ATTR
[GitHub] incubator-trafodion pull request #976: TRAFODION-2492 Support for native hiv...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/976 TRAFODION-2492 Support for native hive views, plus few more changes -- added support for native hive views created externally. These views can be accessed in a traf sql query. There are some restrictions as listed below: -- privileges support has not yet been added. That will be done, as needed, in the next checkin. -- usage info for tables contained in a native hive view is not maintained. -- native hive views cannot be inserted/updated/deleted -- cannot update stats on a native hive view -- support for GET statements to retrieve hive data get tables/views/objects in schema hive.sch; -- this will return all tables/views in specified schema(hive database) get tables/views/objects in catalog hive; -- this will return all tables/views in hive get schemas in catalog hive; -- this will return all schemas(databases) that exist in hive -- GET statements to retrieve hive data now supports optional MATCH clause. This can be used to filter results. -- showddl will show if an external table on hive was created implicitly for internal usage (upd stats, privileges, views) or explicitly by user. Internal creation of external table now use 'create implicit external table' syntax and that info is stored in metadata. -- drop external table will drop that table even if underlying hive table is missing. Currently it returns an error. -- at runtime, accessing a missing hive table now returns a better error message instead of an internal "data mod check failed" message. -- regress/tools/runallsb has 2 new options: -basetests (this will run core,compGeneral,executor,seabase,hive) -othertests (this will run all other tests suites) -- optimizer/NATable.cpp was incorrectly indented by some checkin from a few days back. TABs were used instead of spaces which caused code to become all crooked. That has been fixed. -- regress/hive/TEST007 has been updated with additional hive view tests You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_hiveviews_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/976.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #976 commit 4c3077ce8277ac4ced7d114464348b992e94b4b0 Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2017-02-22T18:02:05Z TRAFODION-2492 Support for native hive views, plus few more changes -- added support for native hive views created externally. These views can be accessed in a traf sql query. There are some restrictions as listed below: -- privileges support has not yet been added. That will be done, as needed, in the next checkin. -- usage info for tables contained in a native hive view is not maintained. -- native hive views cannot be inserted/updated/deleted -- cannot update stats on a native hive view -- support for GET statements to retrieve hive data get tables/views/objects in schema hive.sch; -- this will return all tables/views in specified schema(hive database) get tables/views/objects in catalog hive; -- this will return all tables/views in hive get schemas in catalog hive; -- this will return all schemas(databases) that exist in hive -- GET statements to retrieve hive data now supports optional MATCH clause. This can be used to filter results. -- showddl will show if an external table on hive was created implicitly for internal usage (upd stats, privileges, views) or explicitly by user. Internal creation of external table now use 'create implicit external table' syntax and that info is stored in metadata. -- drop external table will drop that table even if underlying hive table is missing. Currently it returns an error. -- at runtime, accessing a missing hive table now returns a better error message instead of an internal "data mod check failed" message. -- regress/tools/runallsb has 2 new options: -basetests (this will run core,compGeneral,executor,seabase,hive) -othertests (this will run all other tests suites) -- optimizer/NATable.cpp was incorrectly indented by some checkin from a few days back. TABs were used instead of spaces which caused code to become all crooked. That has been fixed. -- regress/hive/TEST007 has been updated with
[GitHub] incubator-trafodion pull request #945: expected file updates for exe/qat reg...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/945 expected file updates for exe/qat regrs caused by previous checkins You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_traf21_fixes Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/945.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #945 commit 110c26ffa501aacaa4ce268c95d62955077409fd Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2017-02-05T02:02:59Z expected file updates for executor/qat regrs caused by previous checkins. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #925: handling of known failures for execut...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/925 handling of known failures for executor/TEST015 and compGeneral/TEST042 executor/TEST015 is being tracked by TRAFODION-2438. A known diff file is being created to handle the diff. compGeneral/TEST042 failure is being tracked by TRAFODION-2457. Once that jira is fixed, this test will be re-enabled. You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_traf21_fixes Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/925.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #925 commit 4d4cc2eb81ac0cc8d0f554a008d6768f2800c038 Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2017-01-21T21:43:50Z handling of known failures for executor/TEST015 and compGeneral/TEST041 executor/TEST015 is being tracked by TRAFODION-2438. A known diff file is being created to handle the diff. compGeneral/TEST042 failure is being reacked by TRAFODION-2457. Once that jira is fixed, this test will be re-enabled. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #921: Various TRAFODION jira fixes, details...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/921 Various TRAFODION jira fixes, details below. TRAFODION-2416 HBASE_OPTIONS on create index are now correctly recreated after data is removed through purgedata command. TRAFODION-2401 a foreign key referential constraint with NOT ENFORCED option no longer creates an index. TRAFODION-2299 A WITH statement now displays number of rows selected instead of 'sql operation complete'. This fix is currently only done for sqlci commands. It still needs to be added to trafci interface. TRAFODION-1796 During regressions run, if default schema 'SCH' doesn't already exist, then it is automatically created and updated in the system defaults table when the first create statement is seen. This change was added a while back. TRAFODION-1637 vsbb delete was incorrectly being chosen when deleting rows from hbase tables in _ROW_ or _CELL_ format. That has been fixed. In addition, the cqd hbase_delete_costing 'OFF' has been removed from seabase/TEST022. hive/TEST007 has been fixed to create a trafodion schema where non-hive tables/views are created. You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_traf21_fixes Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/921.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #921 commit a9ce210789df5082a2fb8dd6d808937022208adf Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2017-01-20T16:50:52Z Various TRAFODION jira fixes, details below. TRAFODION-2416 HBASE_OPTIONS on create index are now correctly recreated after data is removed through purgedata command. TRAFODION-2401 a foreign key referential constraint with NOT ENFORCED option no longer creates an index. TRAFODION-2299 A WITH statement now displays number of rows selected instead of 'sql operation complete'. This fix is currently only done for sqlci commands. It still needs to be added to trafci interface. TRAFODION-1796 During regressions run, if default schema 'SCH' doesn't already exist, then it is automatically created and updated in the system defaults table when the first create statement is seen. This change was added a while back. TRAFODION-1637 vsbb delete was incorrectly being chosen when deleting rows from hbase tables in _ROW_ or _CELL_ format. That has been fixed. In addition, the cqd hbase_delete_costing 'OFF' has been removed from seabase/TEST022. hive/TEST007 has been fixed to create a trafodion schema where non-hive tables/views are created. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #913: TRAFODION-2439 add support for traf v...
Github user anoopsharma00 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/913#discussion_r96706601 --- Diff: core/sql/optimizer/BindRelExpr.cpp --- @@ -13445,6 +13435,14 @@ RelExpr * GenericUpdate::bindNode(BindWA *bindWA) if (getOperatorType() == REL_UNARY_UPDATE || getOperatorType() == REL_UNARY_DELETE) { +if (getTableDesc()->getNATable()->isHiveTable()) + { +*CmpCommon::diags() << DgSqlCode(-4223) +<< DgString0("Update/Delete on Hive table is"); +bindWA->setErrStatus(); +return this; + } + --- End diff -- During binder phase, relational nodes are typed as REL_UNARY_UPDATE or REL_UNARY_DELETE for update or delete operations. Binder checks for them to determine if it is an update or delete. They may later get changed to other upd/del like subset/unique/cursor etc. No update or delete operations are currently supported on hive tables. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #916: TRAFODION-2442 timestamp/date compari...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/916 TRAFODION-2442 timestamp/date comparison bug. And couple other fixes. -- TRAFODION-2442 timestamp comparison with date returns incorrect results. that has been fixed. Date value is expanded to timestamp datatype and then compared. Fix is for timestamp/date comparison only. TIMESTAMP comparison to TIME, and DATE comparison to TIME is not allowed. -- row length of aligned format tables is now calculated correctly and stored in metadata. -- optimizer cost method for sort had a high limit of MEMORY_UNITS_SIZE default set to 20M. For large rows in the range of 10 Mb, this caused an overflow. Fix is to allocate space for MAXOF default and size of 2 rows. You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_trafr21_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/916.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #916 commit fe46974da6feb2bf5ba675f1622b07b7ae503a01 Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2017-01-17T18:50:25Z TRAFODION-2442 timestamp/date comparison bug. And couple other fixes. -- TRAFODION-2442 timestamp comparison with date returns incorrect results. that has been fixed. Date value is expanded to timestamp datatype and then compared. Fix is for timestamp/date comparison only. TIMESTAMP comparison to TIME, and DATE comparison to TIME is not allowed. -- row length of aligned format tables is now calculated correctly and stored in metadata. -- optimizer cost method for sort had a high limit of MEMORY_UNITS_SIZE default set to 20M. For large rows in the range of 10 Mb, this caused an overflow. Fix is to allocate space for MAXOF default and size of 2 rows. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #878: TRAFODION-1586 Support for ext Traf t...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/878 TRAFODION-1586 Support for ext Traf tables mapped to HBase tables This is the initial support for HBase mapped tables. A doc for external manuals will be added later. regress/seabase/TEST022 contains various testcases. You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_hbm_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/878.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #878 commit ac1cdd7d803a48c2e6bba408d6ad0047c4379277 Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2016-12-13T00:35:38Z TRAFODION-1586 Add support for external Traf tables mappedd to HBase tables This is the initial support for HBase mapped tables. A doc for external manuals will be added later. regress/seabase/TEST022 contains various testcases. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #864: updated expected files that changed d...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/864 updated expected files that changed due to a previous err msg checkin You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_trafr21_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/864.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #864 commit 450aa7ddfb25aecf2094480b23b6e94a826bf089 Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2016-12-04T16:37:03Z updated expected files that changed due to a previous err msg checkin --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #846: TRAFODION-2363 Add support to return ...
Github user anoopsharma00 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/846#discussion_r89192496 --- Diff: core/sql/comexe/ComTdbExeUtil.h --- @@ -2946,37 +2946,65 @@ class ComTdbExeUtilLobShowddl : public ComTdbExeUtil static const ComTdbVirtTableColumnInfo hiveMDTablesColInfo[] = { - { "CATALOG_NAME", 0, COM_USER_COLUMN, REC_BYTE_F_ASCII,256, FALSE , SQLCHARSETCODE_UNKNOWN, 0, 0, 0, 0, 0, 0, 0, COM_NO_DEFAULT, "" ,NULL,NULL,COM_UNKNOWN_DIRECTION_LIT, 0}, - { "SCHEMA_NAME", 1,COM_USER_COLUMN, REC_BYTE_F_ASCII,256, FALSE , SQLCHARSETCODE_UNKNOWN, 0, 0, 0, 0, 0, 0, 0, COM_NO_DEFAULT, "" ,NULL,NULL,COM_UNKNOWN_DIRECTION_LIT, 0}, - { "TABLE_NAME",2, COM_USER_COLUMN, REC_BYTE_F_ASCII,256, FALSE , SQLCHARSETCODE_UNKNOWN, 0, 0, 0, 0, 0, 0, 0, COM_NO_DEFAULT, "",NULL,NULL,COM_UNKNOWN_DIRECTION_LIT, 0} + { "CATALOG_NAME", 0, COM_USER_COLUMN, REC_BYTE_F_ASCII,256, FALSE , SQLCHARSETCODE_UTF8, 0, 0, 0, 0, 0, 0, 0, COM_NO_DEFAULT, "" ,NULL,NULL,COM_UNKNOWN_DIRECTION_LIT, 0}, + { "SCHEMA_NAME",1, COM_USER_COLUMN, REC_BYTE_F_ASCII,256, FALSE , SQLCHARSETCODE_UTF8, 0, 0, 0, 0, 0, 0, 0, COM_NO_DEFAULT, "" ,NULL,NULL,COM_UNKNOWN_DIRECTION_LIT, 0}, + { "TABLE_NAME", 2, COM_USER_COLUMN, REC_BYTE_F_ASCII,256, FALSE , SQLCHARSETCODE_UTF8, 0, 0, 0, 0, 0, 0, 0, COM_NO_DEFAULT, "" ,NULL,NULL,COM_UNKNOWN_DIRECTION_LIT, 0}, + { "FILE_FORMAT",3, COM_USER_COLUMN, REC_BYTE_F_ASCII, 24, FALSE , SQLCHARSETCODE_ISO88591, 0, 0, 0, 0, 0, 0, 0, COM_NO_DEFAULT, "" ,NULL,NULL,COM_UNKNOWN_DIRECTION_LIT, 0}, + { "CREATE_TIME",4, COM_USER_COLUMN, REC_BIN64_SIGNED, 8, FALSE , SQLCHARSETCODE_UNKNOWN, 0, 0, 0, 0, 0, 0, 0, COM_NO_DEFAULT, "" ,NULL,NULL,COM_UNKNOWN_DIRECTION_LIT, 0}, --- End diff -- it is to be consistent with how traf metadata create time field is set. That way callers (like DBMgr) can use the same/similar queries when looking at this field for traf and hive tables. Another related note: create time in hive is set to number of seconds from epoch (1 jan 1970). When returning it as part of hivemd, we convert it to juliantimestamp(in microseconds from 1/1/0001). This is consistent with the value returned for tables stored in traf metadata. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #846: TRAFODION-2363 Add support to return ...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/846 TRAFODION-2363 Add support to return hive MD info in relational format See jira for details. Also added support to correctly return tables and views when GET TABLES/VIEWS in VIEWS stmt is issued. You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_hivemd_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/846.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #846 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #824: [TRAFODION-2312] Add support for GROU...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/824 [TRAFODION-2312] Add support for GROUPING_ID function You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_trafr21_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/824.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #824 commit 449691b25489218b458281ee7c4044f6ad088e86 Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2016-11-07T19:58:52Z [TRAFODION-2312] Add support for GROUPING_ID function --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #798: jira [trafodion-2290] and few other b...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/798 jira [trafodion-2290] and few other bug fixes -- trafodion-2290: pcode support for added columns on aligned tables -- lob conversion error is reported instead of crash -- alter table rename is restricted to not run under a user xn -- error during alter table rename are handled correctly -- error during alter/drop cols on aligned tables are handled correctly. -- aligned format drop column with delimited names are handled correctly -- rollup grouping now work correctly on expressions and renamed columns You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_aligned_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/798.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #798 commit 77eda261db650aaa140b6cd3160a9f8d34d97377 Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2016-10-30T01:59:57Z jira [trafodion-2290] and few other bug fixes -- trafodion-2290: pcode support for added columns on aligned tables -- lob conversion error is reported instead of crash -- alter table rename is restricted to not run under a user xn -- error during alter table rename are handled correctly -- error during alter/drop cols on aligned tables are handled correctly. -- aligned format drop column with delimited names are handled correctly -- rollup grouping now work correctly on expressions and renamed columns --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #787: [TRAFODION-2312] Add support for GROU...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/787 [TRAFODION-2312] Add support for GROUPING function for rollup aggr. You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_grouping_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/787.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #787 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #733: [TRAFODION-2246] group by rollup feat...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/733 [TRAFODION-2246] group by rollup feature See comments listed below as part of commit. You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_rollup_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/733.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #733 commit daeb4ae8bc084d72d2c99fb7b52c2a391234cc84 Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2016-09-26T20:42:01Z groupby rollup commit #1 commit 2a5b63252af09ea82b745ef581bd91ce4bad42c7 Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2016-09-28T01:43:49Z Merge remote branch 'origin/master' into ansharma_rollup_br commit 95b4a123c2d32bbbcff681ab34da450d5c067a3b Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2016-09-29T01:29:15Z jira TRAFODION-2246 Add support for GROUP BY ROLLUP feature Syntax: select item1, item2... from ... group by rollup (v1,...,vn) Restrictions related to grouby rollup usage and query transformations listed below. Some may be lifted in later checkins: -- grouping column list must not have duplicate entries -- aggrs must be min/max/sum/avg/count/count(*) -- distinct aggregates are not supported -- grouping columns/values must be nullable. To group on a non-nullable item, use function CAST(v as nullable). This will convert v to nullable, if needed. -- HAVING predicate will not be pushed down to scan predicate. -- group by in a subquery will not be eliminated -- grouping comparison predicate does not use pcode -- group by rollup cannot be replaced by primary key -- groupby will be done using sortgroupby since ordering is needed to materialize rollup groups. -- rollup groupby will be done at root (master root or esp root). This is needed to detect rollup group changes across the whole result set. -- since groupby can materialize new null rows for rollup groups, a final sort operator is needed to be added after groupy even if sortgroupby has already guaranteed that it gets rows in order. Rollup computation logic is discussed in file executor/ex_sort_grby.cpp prior to ex_sort_grby_rollup_tcb::work method. See regress/seabase/TEST033 for tests of various 'group by rollup' functionality. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #718: jira TRAFODION-2234 turn aligned form...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/718 jira TRAFODION-2234 turn aligned format on, phase 1 This is phase 1 of aligned format change. Dev regressions now run with aligned format tables. To test both hbase and aligned format, some tests have explicit specification to create hbase format tables. Tests that test for features that are currently only available with hbase format (like pushdown sel expr) create hbase format tables. Many expected files have been updated to reflect aligned format, mostly in showddl and explain output. You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_br_alform Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/718.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #718 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #717: jira TRAFODION-2184 Fix to order by o...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/717 jira TRAFODION-2184 Fix to order by on renamed expressions code fix so renamed expressions with order by as shown below work: select count(*) aa from t order by count(*); or: select a+1 aa from t order by a+1; You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_trafr21_order Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/717.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #717 commit 6ad9a9a4f651dbf03f7d808d2e3f426a67773ddd Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2016-09-21T14:56:26Z jira TRAFODION-2184 Fix to order by on renamed expressions --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #710: jira TRAFIDION-1435 SQL support for r...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/710 jira TRAFIDION-1435 SQL support for region transactions This checkin is to add support for sql compiler/executor support for dtm region transactions. cqd traf_use_region_xn 'ON' enables it. Off by default for now until dtm support is complete and tested. Explain (full and short) will also show if region transactions are being used. core/test116 has been enhanced with additional tests You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_br_rt Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/710.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #710 commit 632f52fb411d7c9c50c303ecf6ce9fe455a5f257 Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2016-09-18T00:13:28Z jira TRAFIDION-1435 SQL support for region transactions This checkin is to add support for sql compiler/executor support for dtm region transactions. cqd traf_use_region_xn 'ON' enables it. Off by default for now until dtm support is complete and tested. Explain (full and short) will also show if region transactions are being used. core/test116 has been enhanced with additional tests --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #700: jira TRAFODION-2184 groupby/orderby c...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/700 jira TRAFODION-2184 groupby/orderby construct extensions and enablement Following extensions to groupby and order by have been enabled -- group/order by can be done on expressions -- order by clause can be specified within a subquery -- first N clause can be set inside of a subquery Some of these may not be fully tested and if there are bugs, they will be handled at that time. You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_trafr21_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/700.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #700 commit 121e2b3450a8fd658583c7095b046961046f6fe5 Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2016-09-14T03:56:47Z jira TRAFODION-2184 groupby/orderby construct extensions and enablement Following extensions to groupby and order by have been enabled -- group/order by can be done on expressions -- order by clause can be specified within a subquery -- first N clause can be set inside of a subquery Some of these may not be fully tested and if there are bugs, they will be handled at that time. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #695: automatic creation of schemas
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/695 automatic creation of schemas couple changes: 1) if dev regressions are being run and regr schema ("trafodion.sch") doesn't exist, then it is automatically created as part of the first 'create' stmt. This schema is also updated as the default schema in DEFAULTS metadata table. 2) if cqd traf_auto_create_schema is set and the schema specified in a 'create' stmt doesn't exist, then it is automatically created. This helps with migrating scripts from other vendors if schema is specified as part of create table stmt. You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_trafixes_sch Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/695.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #695 commit 48be43e983d2b03dc0d09a44bbda39b8961fece5 Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2016-09-11T20:17:51Z automatic creation of schemas couple changes: 1) if dev regressions are being run and regr schema ("trafodion.sch") doesn't exist, then it is automatically created as part of the first 'create' stmt. This schema is also updated as the default schema in DEFAULTS metadata table. 2) if cqd traf_auto_create_schema is set and the schema specified in a 'create' stmt doesn't exist, then it is automatically created. This helps with migrating scripts from other vendors if schema is specified as part of create table stmt. commit 81c1c6d9596fdefc1f133fea6617492f32190bbd Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2016-09-11T20:23:19Z Merge remote branch 'origin/master' into ansharma_trafixes_br --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #689: JIRA TRAFODION-2200 Vol/Ext opers wit...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/689 JIRA TRAFODION-2200 Vol/Ext opers with hive schema default return errors -- JIRA TRAFODION-2200 some operations on volatile and external tables no longer return errors if catalog/schema default is set to hive.hive -- updated compGeneral/test042 regressions expected/known diff file -- redef time for views was not being updated correctly. That has been fixed -- removed an unneeded printf stmt from native expr optimizer You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_trafixes_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/689.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #689 commit 8d0fce376c665c68d7e34f513fdebbf73ffd1314 Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2016-09-08T19:58:04Z JIRA TRAFODION-2200 Vol/Ext opers with hive schema default return errors -- JIRA TRAFODION-2200 some operations on volatile and external tables no longer return errors if catalog/schema default is set to hive.hive -- updated compGeneral/test042 regressions expected/known diff file -- redef time for views was not being updated correctly. That has been fixed -- removed an unneeded printf stmt from native expr optimizer --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #684: [TRAFODION-1676] rework, fix executor...
Github user anoopsharma00 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/684#discussion_r77244637 --- Diff: core/sql/exp/exp_datetime.cpp --- @@ -92,6 +92,30 @@ copyDatetimeFields(rec_datetime_field startField, Lng32 dstLen, NABoolean *roundedDownFlag); +// Helper function to format extra error message text and report error +// srcData is not null terminated, so need a buffer copy to build a C-style string +// +static void +raiseDateConvErrorWithSrcData(int srcLen, ComDiagsArea** diagsArea, char *srcData, CollHeap *heap) +{ +char errstr[MAX_OFFENDING_SOURCE_DATA_DISPLAY_LEN]; +memset(errstr, 0 , sizeof(errstr) ); +if(srcLen > MAX_OFFENDING_SOURCE_DATA_DISPLAY_LEN -1 ) + srcLen = MAX_OFFENDING_SOURCE_DATA_DISPLAY_LEN -1; +strncpy(errstr, srcData, srcLen); +ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_DATETIME_ERROR,NULL,NULL,NULL,NULL,errstr); +} + +// Helper function to format extra error message text and report error +// +static void +raiseDateConvErrorWithSrcDataNumeric(ComDiagsArea** diagsArea, long srcData, CollHeap *heap) +{ + char errstr[MAX_OFFENDING_SOURCE_DATA_DISPLAY_LEN]; + memset(errstr, 0 , sizeof(errstr) ); + sprintf(errstr,"%ld",srcData); --- End diff -- we should also try to use the str_* methods from common/str.h, if possible. At one point, use of local str_* methods was mandatory and code wouldn't compile without it, but over time we have started to use of native C string functions. In the code listed above, the C functions will be replaced by these str_* methods: memset ---> str_pad strncpy ---> str_cpy_all sprintf---> str_sprintf str_* methods may internally call native C functions but it provides a common entry point for them. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #686: Additional changes to JIRA TRAFODION-...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/686 Additional changes to JIRA TRAFODION-2060 plus couple other fixes -- interval computations involving tinyint are fixed. -- hive data mod mismatch error now prints the compile and runtime timestamps that caused the mismatch. -- hive test003 updated to truncate data before insert You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_trafr21_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/686.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #686 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #661: [TRAFODION-2161] Support migration of...
Github user anoopsharma00 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/661#discussion_r75370376 --- Diff: core/sql/sqlcomp/CmpSeabaseDDLrepos.cpp --- @@ -516,6 +585,62 @@ short CmpSeabaseDDL::upgradeReposComplete(ExeCliInterface * cliInterface, case 1: { +// If there were views on the old Repository tables, they are +// still there, by virtue of the fact that we did "SKIP VIEW CHECK" +// on the ALTER TABLE RENAME. Now we will capture their view +// definitions (which will contain the old table name, not the +// renamed table name) and replay that against the new Repository +// table. If the replay fails, we treat that as an unrecoverable +// situation and ignore it. Instead, we'll save the view definition +// text in the TEXT table with a different TEXT_TYPE and clue the +// user in that it is there. They can then try to create the view +// at their leisure. Note that they may have to change the view +// definition themselves, e.g. if we dropped a column from the +// repository table that their view happened to reference. +// --- End diff -- Metadata tables store static information about objects. They dont usually contain status or error information about user action. Looks like TEXT table is being overloaded to contain metadata related information as well as error log status. Failed actions are logged in log files. install may be putting them in error logs. Another example of logging error information is when failed rows during load are logged into error logs that users can query later. Upgrade is a platform only operation that is done as part of install/upgrade. Would it be better to put failed operations in an error log that can be queried or looked at later. Maybe at some point a repository error log table can be added that contains information about failed operations. And this table is viewable by everyone. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #658: TRAFODION-2162 showplan enhancement t...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/658 TRAFODION-2162 showplan enhancement to display expr instruction display the instruction enum being generated in text format. Output will include the instruction and look like: Clause #2: ex_arith_clause ... instruction: ADD_BIN16S_BIN16S_BIN16S(0), instrArrayIndex_: 0 Clause #1: ex_comp_clause OperatorTypeEnum = ITM_GREATER(2024), NumOperands = 3 ... instruction: GT_BIN32S_BIN16S(40), instrArrayIndex_: 218 In addition, some cleanup has been done in expression code. You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_showplan_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/658.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #658 commit 4c83ecab0363b8ddde84c92a7843b26e72c82413 Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2016-08-15T01:35:03Z showplan enhancement to display expr instruction display the instruction enum being generated in text format. Output will include the instruction and look like: Clause #2: ex_arith_clause ... instruction: ADD_BIN16S_BIN16S_BIN16S(0), instrArrayIndex_: 0 Clause #1: ex_comp_clause OperatorTypeEnum = ITM_GREATER(2024), NumOperands = 3 ... instruction: GT_BIN32S_BIN16S(40), instrArrayIndex_: 218 In addition, some cleanup has been done in expression code. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #654: Various fixes, details listed below
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/654 Various fixes, details listed below --error message returned during string to float conversion error was not correct. That has been fixed. -- ordering was not getting set correctly during key encoding. -- stored descriptor was not getting stored correctly if the generated length was exactly 1 bytes (max length of TEXT.text col). -- time part of european date format is now handled correctly by using '.' as delimiter instead of ':' -- repeat function was crashing if specified maxlength was not sufficient to hold the result. It now returns an overflow error. -- tinyint key columns were not handling the case of overflow/underflow when used in a key predicate. That has been fixed. -- Numeric datatype with precision less than 3 is now created as tinyint and handled in expressions. -- some non-tinyint datatypes(float, decimal) were not being handled correctly when converted to tinyint. That has been fixed. -- some more pcode instructions involving tinyint range check and conversions have been added. You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_trafixes_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/654.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #654 commit 52234cd846f4ba7bda76d95a36173c740cea224c Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2016-08-11T21:16:52Z Various fixes, details listed below --error message returned during string to float conversion error was not correct. That has been fixed. -- ordering was not getting set correctly during key encoding. -- stored descriptor was not getting stored correctly if the generated length was exactly 1 bytes (max length of TEXT.text col). -- time part of european date format is now handled correctly by using '.' as delimiter instead of ':' -- repeat function was crashing if specified maxlength was not sufficient to hold the result. It now returns an overflow error. -- tinyint key columns were not handling the case of overflow/underflow when used in a key predicate. That has been fixed. -- Numeric datatype with precision less than 3 is now created as tinyint and handled in expressions. -- some non-tinyint datatypes(float, decimal) were not being handled correctly when converted to tinyint. That has been fixed. -- some more pcode instructions involving tinyint range check and conversions have been added. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #641: [JIRA TRAFODION-2141] Cluster view of...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/641 [JIRA TRAFODION-2141] Cluster view of hbase stats -- added column REGION_SERVER to region stats virtual table -- added cluster view of hbase stats Syntax: select * from table(cluster stats()); -- added support for 'where' pred in stats queries Syntax: select * from table(cluster stats()) where schema_name = 'SCH'; You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_regstats_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/641.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #641 commit 92c845312d1d3bff885cdc5fe92a89d526748377 Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2016-08-04T19:28:21Z [JIRA TRAFODION-2141] Cluster view of hbase stats -- added column REGION_SERVER to region stats virtual table -- added cluster view of hbase stats Syntax: select * from table(cluster stats()); -- added support for 'where' pred in stats queries Syntax: select * from table(cluster stats()) where schema_name = 'SCH'; --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #638: JIRA-2137 Addnl change to metadata im...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/638 JIRA-2137 Addnl change to metadata improvement based on review comments Code now handles writing binary data into TEXT after encoding it. And decodes it during read. Non-binary data is added using input params instead of literals. You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_mdp_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/638.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #638 commit f6966c703b66fda1d5c2be4377fad72f51a9727d Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2016-08-03T21:53:24Z JIRA-2137 Addnl change to metadata improvement based on review comments Code now handles writing binary data into TEXT after encoding it. And decodes it during read. Non-binary data is added using input params instead of literals. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #634: JIRA TRAFODION-2137 metadata access p...
Github user anoopsharma00 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/634#discussion_r73251153 --- Diff: core/sql/sqlcat/TrafDDLdesc.h --- @@ -0,0 +1,1120 @@ +/** +// @@@ START COPYRIGHT @@@ +// +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// +// @@@ END COPYRIGHT @@@ +// +**/ +#ifndef TRAF_DDL_DESC_H +#define TRAF_DDL_DESC_H + +#include "Platform.h" +#include "NAVersionedObject.h" +#include "charinfo.h" +#include "ComSmallDefs.h" + +#define GENHEAP(h)(h ? (NAMemory*)h : CmpCommon::statementHeap()) + +enum ConstraintType { UNIQUE_CONSTRAINT, PRIMARY_KEY_CONSTRAINT, REF_CONSTRAINT, + CHECK_CONSTRAINT + }; + +enum desc_nodetype { + DESC_UNKNOWN_TYPE = 0, + DESC_CHECK_CONSTRNTS_TYPE, + DESC_COLUMNS_TYPE, + DESC_CONSTRNTS_TYPE, + DESC_CONSTRNT_KEY_COLS_TYPE, + DESC_FILES_TYPE, + DESC_HBASE_RANGE_REGION_TYPE, + DESC_HISTOGRAM_TYPE, + DESC_HIST_INTERVAL_TYPE, + DESC_INDEXES_TYPE, + DESC_KEYS_TYPE, + DESC_PARTNS_TYPE, + DESC_REF_CONSTRNTS_TYPE, + DESC_TABLE_TYPE, + DESC_USING_MV_TYPE, // MV -- marks an MV using this object + DESC_VIEW_TYPE, + DESC_SCHEMA_LABEL_TYPE, + DESC_SEQUENCE_GENERATOR_TYPE, + DESC_ROUTINE_TYPE, + DESC_LIBRARY_TYPE +}; + +class TrafDesc; +typedef NAVersionedObjectPtrTempl DescStructPtr; + +class TrafCheckConstrntsDesc; +class TrafColumnsDesc; +class TrafConstrntsDesc; +class TrafConstrntKeyColsDesc; +class TrafHbaseRegionDesc; +class TrafHistogramDesc; +class TrafHistIntervalDesc; +class TrafFilesDesc; +class TrafKeysDesc; +class TrafIndexesDesc; +class TrafLibraryDesc; +class TrafPartnsDesc; +class TrafRefConstrntsDesc; +class TrafRoutineDesc; +class TrafSequenceGeneratorDesc; +class TrafTableDesc; +class TrafUsingMvDesc; +class TrafViewDesc; + +class TrafDesc : public NAVersionedObject { +public: + enum {CURR_VERSION = 1}; + + TrafDesc(UInt16 nodeType); + TrafDesc() : NAVersionedObject(-1) {} + + // - + // Redefine virtual functions required for Versioning. + //-- + virtual unsigned char getClassVersionID() + { +return 1; + } + + virtual void populateImageVersionIDArray() + { +setImageVersionID(0,getClassVersionID()); + } + + virtual short getClassSize() { return (short)sizeof(TrafDesc); } + + virtual Lng32 migrateToNewVersion(NAVersionedObject *); + + virtual char *findVTblPtr(short classID); + + virtual Long pack(void *space); + virtual Lng32 unpack(void * base, void * reallocator); + + Lng32 validateSize(); + Lng32 validateVersion(); + + UInt16 nodetype; + UInt16 version; + UInt32 descFlags; + DescStructPtr next; + char* descExtension; // extension of descriptor, if it needs to be extended + + virtual TrafCheckConstrntsDesc *checkConstrntsDesc() const { return NULL; } + virtual TrafColumnsDesc *columnsDesc() const { return NULL; } + virtual TrafConstrntsDesc *constrntsDesc() const { return NULL; } + virtual TrafConstrntKeyColsDesc *constrntKeyColsDesc() const { return NULL; } + virtual TrafFilesDesc *filesDesc() const { return NULL; } + virtual TrafHbaseRegionDesc *hbaseRegionDesc() const { return NULL; } + virtual TrafHistogramDesc *histogramDesc() const { return NULL; } + virtual TrafHistIntervalDesc *histIntervalDesc() const { return NULL; } + virtual TrafKeysDesc *keysDesc() const { return NULL; } + virtual TrafInde
[GitHub] incubator-trafodion pull request #634: JIRA TRAFODION-2137 metadata access p...
Github user anoopsharma00 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/634#discussion_r73250948 --- Diff: core/sql/sqlcat/TrafDDLdesc.h --- @@ -0,0 +1,1120 @@ +/** +// @@@ START COPYRIGHT @@@ +// +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// +// @@@ END COPYRIGHT @@@ +// +**/ +#ifndef TRAF_DDL_DESC_H +#define TRAF_DDL_DESC_H + +#include "Platform.h" +#include "NAVersionedObject.h" +#include "charinfo.h" +#include "ComSmallDefs.h" + +#define GENHEAP(h)(h ? (NAMemory*)h : CmpCommon::statementHeap()) + +enum ConstraintType { UNIQUE_CONSTRAINT, PRIMARY_KEY_CONSTRAINT, REF_CONSTRAINT, + CHECK_CONSTRAINT + }; + +enum desc_nodetype { + DESC_UNKNOWN_TYPE = 0, + DESC_CHECK_CONSTRNTS_TYPE, + DESC_COLUMNS_TYPE, + DESC_CONSTRNTS_TYPE, + DESC_CONSTRNT_KEY_COLS_TYPE, + DESC_FILES_TYPE, + DESC_HBASE_RANGE_REGION_TYPE, + DESC_HISTOGRAM_TYPE, + DESC_HIST_INTERVAL_TYPE, + DESC_INDEXES_TYPE, + DESC_KEYS_TYPE, + DESC_PARTNS_TYPE, + DESC_REF_CONSTRNTS_TYPE, + DESC_TABLE_TYPE, + DESC_USING_MV_TYPE, // MV -- marks an MV using this object + DESC_VIEW_TYPE, + DESC_SCHEMA_LABEL_TYPE, + DESC_SEQUENCE_GENERATOR_TYPE, + DESC_ROUTINE_TYPE, + DESC_LIBRARY_TYPE +}; + +class TrafDesc; +typedef NAVersionedObjectPtrTempl DescStructPtr; + +class TrafCheckConstrntsDesc; +class TrafColumnsDesc; +class TrafConstrntsDesc; +class TrafConstrntKeyColsDesc; +class TrafHbaseRegionDesc; +class TrafHistogramDesc; +class TrafHistIntervalDesc; +class TrafFilesDesc; +class TrafKeysDesc; +class TrafIndexesDesc; +class TrafLibraryDesc; +class TrafPartnsDesc; +class TrafRefConstrntsDesc; +class TrafRoutineDesc; +class TrafSequenceGeneratorDesc; +class TrafTableDesc; +class TrafUsingMvDesc; +class TrafViewDesc; + +class TrafDesc : public NAVersionedObject { +public: + enum {CURR_VERSION = 1}; + + TrafDesc(UInt16 nodeType); + TrafDesc() : NAVersionedObject(-1) {} + + // - + // Redefine virtual functions required for Versioning. + //-- + virtual unsigned char getClassVersionID() + { +return 1; + } + + virtual void populateImageVersionIDArray() + { +setImageVersionID(0,getClassVersionID()); + } + + virtual short getClassSize() { return (short)sizeof(TrafDesc); } + + virtual Lng32 migrateToNewVersion(NAVersionedObject *); + + virtual char *findVTblPtr(short classID); + + virtual Long pack(void *space); + virtual Lng32 unpack(void * base, void * reallocator); + + Lng32 validateSize(); + Lng32 validateVersion(); + + UInt16 nodetype; + UInt16 version; + UInt32 descFlags; + DescStructPtr next; + char* descExtension; // extension of descriptor, if it needs to be extended + + virtual TrafCheckConstrntsDesc *checkConstrntsDesc() const { return NULL; } + virtual TrafColumnsDesc *columnsDesc() const { return NULL; } + virtual TrafConstrntsDesc *constrntsDesc() const { return NULL; } + virtual TrafConstrntKeyColsDesc *constrntKeyColsDesc() const { return NULL; } + virtual TrafFilesDesc *filesDesc() const { return NULL; } + virtual TrafHbaseRegionDesc *hbaseRegionDesc() const { return NULL; } + virtual TrafHistogramDesc *histogramDesc() const { return NULL; } + virtual TrafHistIntervalDesc *histIntervalDesc() const { return NULL; } + virtual TrafKeysDesc *keysDesc() const { return NULL; } + virtual TrafInde
[GitHub] incubator-trafodion pull request #634: JIRA TRAFODION-2137 metadata access p...
Github user anoopsharma00 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/634#discussion_r73250622 --- Diff: core/sql/arkcmp/CmpStoredProc.cpp --- @@ -363,7 +361,7 @@ NABoolean CmpSPOutputFormat::getColumnDesc(SP_FIELDDESC_STRUCT* fDesc, { // convert ElemDDLColViewDef into CatColumn, then column_desc if ( !ElemDDLColDef2ColumnDescStruct - (elemDDL, tableDesc_->body.table_desc.tablename, colsDesc) ) + (elemDDL, tableDesc_->tableDesc()->tablename, colsDesc) ) --- End diff -- For this checkin, wanted to keep the code structure somewhat similar to how it was. That made it easier to make changes (lots of search and replace). The old code used desc_struct which was replaced by TrafDesc class in the new code. For a later checkin, we can change to using the underlying class instead of base class. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #634: metadata access performance improveme...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/634 metadata access performance improvement for accessing traf objects Packed version of descriptor structures is now stored in traf TEXT table during various DDL operations. During dml, if packed descriptors exist, then they are read and used. If they dont exist, then descriptors are generated on the fly. Descriptor classes are defined in file sqlcat/TrafDDLdesc.h and are based off the older desc structures from desc.h. These are simplified and class'ified version of the older structures and are versioned. Changes to these classes should be done carefully by either using filler bytes or versioning them. 2 new cqds, traf_store_object_descriptor and traf_read_object_descriptor, are added to control if packed descs should be stored/read. These are currently set to OFF by default but are enabled during regressions run. Once this feature is tested, these cqds will be turned on by default. In addition, some helper commands have been added to manipulate descrs. Syntax: alter table t [check|generate|delete|disable|enable] stored descritors If authorization is enabled, then auth/priv specific info is generated on the fly and currently not stored in metadata. In a later checkin, these will also be stored in metadata. You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_mdperf_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/634.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #634 commit 19c96b1ec830f7b340854b37d8b5e6fea72554fd Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2016-08-02T19:46:35Z metadata access performance improvement for accessing traf objects Packed version of descriptor structures is now stored in traf TEXT table during various DDL operations. During dml, if packed descriptors exist, then they are read and used. If they dont exist, then descriptors are generated on the fly. Descriptor classes are defined in file sqlcat/TrafDDLdesc.h and are based off the older desc structures from desc.h. These are simplified and class'ified version of the older structures and are versioned. Changes to these classes should be done carefully by either using filler bytes or versioning them. 2 new cqds, traf_store_object_descriptor and traf_read_object_descriptor, are added to control if packed descs should be stored/read. These are currently set to OFF by default but are enabled during regressions run. Once this feature is tested, these cqds will be turned on by default. In addition, some helper commands have been added to manipulate descrs. Syntax: alter table t [check|generate|delete|disable|enable] stored descritors If authorization is enabled, then auth/priv specific info is generated on the fly and currently not stored in metadata. In a later checkin, these will also be stored in metadata. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #596: [JIRA TRAFODION-2060] additional chan...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/596 [JIRA TRAFODION-2060] additional changes to tinyint datatype support (and one more fix) -- tinyint datatype was not correctly converted to a corresponding datatype(returned type and input params) in all cases for callers that dont yet support tinyint/boolean datatypes. This caused phoenix tests for t4/t2 drivers to fail. That has been fixed. -- unsupported datatypes are no longer converted to equivalent datatypes if select is for a view. -- swstatus output change was causing seabase/hive regressions to incorrectly stop and start hadoop. regression scripts have been updated to reflect the swstatus change. You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_trafr21_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/596.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #596 commit ff0dd266394973861c9765b364a0a94d6118d908 Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2016-07-16T00:26:00Z [JIRA TRAFODION-2060] additional changes to tinyint change -- tinyint datatype was not correctly converted to a corresponding datatype(returned type and input params) in all cases for callers that dont yet support tinyint/boolean datatypes. That has been fixed. -- unsupported datatypes are no longer converted to equivalent datatypes if select is for a view. -- swstatus output change was causing seabase/hive regressions to incorrectly stop and start hadoop. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #590: JIRA TRAFODION-2099 Add support for b...
Github user anoopsharma00 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/590#discussion_r70459281 --- Diff: core/sql/common/str.cpp --- @@ -997,19 +997,40 @@ Lng32 str_decode(void *tgt, Lng32 tgtMaxLen, const char *src, Lng32 srcLen) return length; } -// Strips leading and trailing blanks. src will contain a NULL after the +// Strips leading and/or trailing blanks. src will contain a NULL after the // end of the first non-blank character.The length of the "stripped" string -// is returned in len - -void str_strip_blanks(char *src , Lng32 ) +// is returned in len. +// Returns pointer to the start of string after leading blanks. +char * str_strip_blanks(char *src , Lng32 , +NABoolean stripLeading, +NABoolean stripTrailing +) { + if (! src) +return NULL; + len = str_len(src)-1; - while ((len >= 0) && (src[len] == ' ')) -len--; + if (len <= 0) +return src; --- End diff -- Returned value from this method is a pointer to the string. Length is not returned. The check at line 1013 returns the input src if its length is 1. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #590: JIRA TRAFODION-2099 Add support for b...
Github user anoopsharma00 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/590#discussion_r70459305 --- Diff: core/sql/optimizer/ItemArith.h --- @@ -250,4 +250,36 @@ class BiArithCount : public BiArith private: }; +class UnArith : public ItemExpr +{ + // ITM_NEGATE. Used with negation of boolean native datatype --- End diff -- unary minus is converted to "0 - val" during parser/binder step. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #590: JIRA TRAFODION-2099 Add support for b...
Github user anoopsharma00 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/590#discussion_r70459837 --- Diff: core/sql/optimizer/UdfDllInteraction.cpp --- @@ -1214,6 +1214,29 @@ NABoolean TMUDFInternalSetup::setTypeInfoFromNAType( switch (length) { // SMALLINT, INT, LARGEINT, NUMERIC, signed and unsigned +case 1: + if (CmpCommon::getDefault(TRAF_TINYINT_SPJ_SUPPORT) == DF_ON) --- End diff -- Some support still need to be added to SPJ/T2 driver path for tinyint. If this cqd is turned on, it continues to the path of processing tinyint. Since tinyint support is not yet in for spj/t2, an error is currently returned. This is not an externalized cqd. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #573: regr fix
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/573 regr fix You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_uint64_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/573.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #573 commit 48e0d9f2ec83dcbc745f77dab9bbf9b9b1e7f6b7 Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2016-07-03T04:43:24Z regr fix --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #560: JIRA 2086 Support for largeint unsign...
Github user anoopsharma00 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/560#discussion_r69309773 --- Diff: core/sql/common/Int64.cpp --- @@ -136,6 +140,22 @@ void convertInt64ToAscii(const Int64 , char* tgt) strcpy(tgt, s); } +void convertUInt64ToAscii(const UInt64 , char* tgt) +{ + UInt64 temp = src; + char buffer[21]; + char *s = [21]; + *--s = '\0'; + do { +char c = (char) (temp % 10); +if (c < 0) + c = -c; --- End diff -- And there is your cut-and-paste issue :) This method is a copy of existing method convertInt64ToAscii which converts a signed number to ascii. The new convertUInt64ToAscii method doesn't need the 'c < 0' check though it will never be reached. Will fix that for a later checkin. Existing convert methods in Int64.cpp pass in input value as reference parameter so the new method just followed the same. Am not sure what the original intent was, maybe some perf improvement. I will leave it as a reference param. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #560: JIRA 2086 Support for largeint unsign...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/560 JIRA 2086 Support for largeint unsigned This commit delivers part 1 of the jira changes. It includes changes in traf compiler, executor and expressions to handle largeint unsigned datatype. You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_uint64_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/560.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #560 commit ef98b7d8dcad6cf2041f33a016985b2db889ba4b Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2016-06-18T23:22:13Z support for largeint unsigned: commit #1 commit fa86814317d17980ed1821c6878aa2e4e87f5150 Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2016-06-21T04:42:21Z Merge remote branch 'origin/master' into ansharma_uint64_br commit 43595eaa112229db88a226fc1c4b84a5f7287fa7 Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2016-06-21T23:55:14Z Merge remote branch 'origin/master' into ansharma_uint64_br commit 584936e09b4195013bb838bbf46953210fbec03b Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2016-06-23T20:09:45Z Merge remote branch 'origin/master' into ansharma_uint64_br commit d5999d8c47f2bd5e44fbaf867597f4d678fa6aec Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2016-06-24T04:49:46Z Merge remote branch 'origin/master' into ansharma_uint64_br commit 911f1d64f83aabf280825361534673eba041f959 Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2016-06-25T17:27:53Z JIRA 2086 Add support for largeint unsigned This commit delivers part 1 of the jira changes. It includes changes in traf compiler, executor and expressions to handle largeint unsigned datatype. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #555: JIRA TRAFODION-2084 Handling of inval...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/555 JIRA TRAFODION-2084 Handling of invalid data inserts into hive tables cqd hive_insert_error_mode '' has been added to control insert behavior. if 0, datatype error check is not done during inserts into hive tables. Invalid values may get inserted. This is the behavior prior to this JIRA fix. if 1, error check done, row is not inserted if conversion error. Insertion stops. This is new default behavior. if 2, error check done, row is not inserted if conversion error. Insertion continues with next row if 3, null inserted if conversion error. Insertion processing continues. This is hive behavior. You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_hiveinserr_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/555.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #555 commit 392c60889cb437e08e3718a3fc54c244cbfb123b Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2016-06-22T20:19:59Z JIRA TRAFODION-2084 Handling of invalid data inserts into hive tables cqd hive_insert_error_mode '' has been added to control insert behavior. if 0, datatype error check is not done during inserts into hive tables. Invalid values may get inserted. This is the behavior prior to this JIRA fix. if 1, error check done, row is not inserted if conversion error. Insertion stops. This is new default behavior. if 2, error check done, row is not inserted if conversion error. Insertion continues with next row if 3, null inserted if conversion error. Insertion processing continues. This is hive behavior. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #552: JIRA TRAFODION-2072 plus few more
Github user anoopsharma00 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/552#discussion_r67918004 --- Diff: core/sql/common/NAType.cpp --- @@ -670,6 +671,84 @@ short NAType::convertTypeToText(char * text, // OUTPUT displayCaseSpecific); } +short NAType::getMyTypeAsHiveText(NAString * outputStr) // output +{ + Lng32 fs_datatype = getFSDatatype(); + + switch (fs_datatype) +{ +case REC_MIN_F_CHAR_H ... REC_MAX_F_CHAR_H: + *outputStr = "string"; + break; + +case REC_MIN_V_CHAR_H ... REC_MAX_V_CHAR_H: + { +SQLVarChar * ct = (SQLVarChar*)this; +if (ct->wasHiveString()) + *outputStr = "string"; --- End diff -- yes, that is correct. Both hive string and varchar datatypes are represented as traf varchar datatypes. hive varchar has predefined length. hive string length is determined by a session cqd. The 'wasHiveString' field tells whether it was originally a string datatype. This is used during showddl command to show the original datatype. At a later poing, It will also be used to limit the length of data that can be put into a hive column. For hive varchar, it will be limited by the pre-specified length. For hive string, it will be limited by the hive length cqd that is set for that session. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #552: JIRA TRAFODION-2072 plus few more
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/552 JIRA TRAFODION-2072 plus few more -- long varchars (> 32K) are handled for traf (regular and aligned) and hive tables -- showddl for hive tables shows traf and hive definitions -- traf external tables can optionally take columns attrs that would overwrite corresponding hive col attrs -- metadata is updated with info no whether col attrs were specified -- 'repeat' function can optionally take a max length parameter -- error is returned if an external table is created for non-hive -- tests added to regress/seabase/TEST031 and hive/TEST009 You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_longvc_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/552.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #552 commit b39f7524104659a2ca14cb09ddf6cab817491211 Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2016-06-20T23:07:19Z JIRA TRAFODION-2072 plus few more -- long varchars (> 32K) are handled for traf (regular and aligned) and hive tables -- showddl for hive tables shows traf and hive definitions -- traf external tables can optionally take columns attrs that would overwrite corresponding hive col attrs -- metadata is updated with info no whether col attrs were specified -- 'repeat' function can optionally take a max length parameter -- error is returned if an external table is created for non-hive -- tests added to regress/seabase/TEST031 and hive/TEST009 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #545: JIRA TRAFODION-2060 Add support for t...
Github user anoopsharma00 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/545#discussion_r67392794 --- Diff: core/sql/common/NumericType.h --- @@ -445,6 +443,99 @@ class SQLBPInt : public NumericType // *** // +// SQLTiny : SQL TINY +// +// *** +class SQLTiny : public NumericType +{ +public: + // - + // Constructor functions + // - + SQLTiny (NABoolean allowNegValues = TRUE, + NABoolean allowSQLnull = TRUE, + CollHeap * heap =0); + + short getFSDatatype() const +{ + if (isUnsigned()) + return REC_BIN8_UNSIGNED; + else + return REC_BIN8_SIGNED; +} + + NABoolean roundTripConversionToDouble() const { return TRUE; }; + + virtual Lng32 getMagnitude() const { return isUnsigned() ? 28 : 25; } --- End diff -- Magnitude is the number of digits to the left of decimal point. NUMERIC(5,2) as magnitude of 3. It is used during expression set up to correctly determine what an expression result should be. Datatypes with binary precision and no scale (int, smallint, etc) do not have exact precision. Tinyint has precision of 3 digits (max val 255 for unsigned or 127 for signed). The getMagnitude method returns an approx magnitude that is used during expression set up. 28 means magnitude between 2 and 3 (multiplied by 10). Unsigned magnitude is larger value than signed magnitude. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #545: JIRA TRAFODION-2060 Add support for t...
Github user anoopsharma00 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/545#discussion_r67391298 --- Diff: core/sql/common/BaseTypes.cpp --- @@ -412,6 +419,13 @@ short convertTypeToText_basic(char * text,// OUTPUT str_sprintf(text, "NUMERIC(%d, %d) UNSIGNED", precision, scale); break; +case REC_BIN8_UNSIGNED: + if (!precision) +str_sprintf(text, "TINYINT UNSIGNED"); + else + str_sprintf(text, "NUMERIC(%d, %d)", precision, scale); --- End diff -- At current time, NUMERIC datatypes are handled as smallint, int or largeint. They are not converted to tinyint. That could be done at some point. So this code will not be reached. But review comment is correct about this code being incorrect and I have fixed it. If we do enhance NUMERIC with precision <= 2 to be treated as tinyint, then this code will be exercised. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #516: JIRA TRAFODION-2022 Add support for p...
Github user anoopsharma00 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/516#discussion_r65596782 --- Diff: core/sql/optimizer/RelExeUtil.cpp --- @@ -4981,9 +4981,43 @@ RelExpr * ExeUtilFastDelete::bindNode(BindWA *bindWA) { // do not do override schema for this bindWA->setToOverrideSchema(FALSE); - + naTable = bindWA->getNATable(getTableName()); - if (getTableName().isSeabase()) + if (getTableName().isHive()) +{ + if (! naTable) +{ + *CmpCommon::diags() << DgSqlCode(-4222) << DgString0("PURGEDATA"); + bindWA->setErrStatus(); + return NULL; +} + + const HHDFSTableStats* hTabStats = +naTable->getClusteringIndex()->getHHDFSTableStats(); + + isHiveTable_ = TRUE; + + const char * hiveTablePath = (*hTabStats)[0]->getDirName(); + NAString hostName; + Int32 hdfsPort; + NAString tableDir; + + NABoolean result = ((HHDFSTableStats* )hTabStats)->splitLocation +(hiveTablePath, hostName, hdfsPort, tableDir) ; + if (!result) +{ + *CmpCommon::diags() << DgSqlCode(-4224) + << DgString0(hiveTablePath); + bindWA->setErrStatus(); + return this; --- End diff -- Binder component returns 'this' at some places and 'null' at others in case of an error. At some point it probably started with one or the other but over time it has become inconsistent. But it will/should always set bindWA->setErrStatus() before return. And caller must check for bindWA->getErrStatus() to see if an error occurred and if the caller must act on that error. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request #516: JIRA TRAFODION-2022 Add support for p...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/516 JIRA TRAFODION-2022 Add support for purgedata of hive tables In addition to purgedata: -- showplan correctly shows aqr setting -- data modification check is skipped during insert if overwrite option was used You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_hivets_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/516.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #516 commit c8a6187f08d8bcb0074630b2e30fea723c53733c Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2016-06-02T14:52:21Z JIRA TRAFODION-2022 Add support for purgedata of hive tables In addition to purgedata: -- showplan correctly shows aqr setting -- data modification check is skipped during insert if overwrite option was used --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request: JIRA TRAFODION-2006 Hive table structure a...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/511 JIRA TRAFODION-2006 Hive table structure and data changes are now detected correctly. You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_hivets_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/511.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #511 commit f4728220c7a21f06c5c295e7a4c515a09a1a219d Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2016-05-22T04:26:45Z hive data modification detection: commit #1 commit cb6a75c63f7cfa0ed211dfe22f733ab0fedd4383 Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2016-05-23T15:33:29Z Merge remote branch 'origin/master' into ansharma_hivets_br Conflicts: core/sql/sqlcomp/DefaultConstants.h commit 772b4a3410821f8dda0ce2cad10cc81c31ff6f1d Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2016-05-27T14:01:09Z Merge remote branch 'origin/master' into ansharma_hivets_br commit 1820da1cf3776a318951c241814e92a4980ccd34 Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2016-05-28T01:10:23Z hive data modification detection: commit #2 commit fa70e6831470cccfd86887f9607591f242512fa7 Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2016-05-28T01:19:42Z Merge remote branch 'origin/master' into ansharma_hivets_br Conflicts: core/sql/comexe/ComTdbHdfsScan.h core/sql/generator/GenRelScan.cpp core/sql/regress/hive/EXPECTED005 commit b1a8f024b5a3d4db368b51bbd2b6aac7035b9571 Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2016-05-30T13:48:16Z hive data modification detection: commit #3 commit 51a9c73ed37c3711178483c4a200f17a92d1c08d Author: Anoop Sharma <anoop.sha...@esgyn.com> Date: 2016-05-31T18:03:40Z hive data modification detection: commit #4 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request: [TRAFODION-1920] suppress SQL er...
Github user anoopsharma00 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/461#discussion_r62044508 --- Diff: core/sql/regress/hive/EXPECTED005 --- @@ -534,4 +534,101 @@ C1 C2 >>cqd HIVE_SCAN_SPECIAL_MODE reset; --- SQL operation complete. +>>select * from tbl_bad; + +*** ERROR[8413] The string argument contains characters that cannot be converted. + +--- 0 row(s) selected. +>>cqd HIVE_SCAN_SPECIAL_MODE '2'; + +--- SQL operation complete. +>>select * from tbl_bad; + +C1 C2C3 C4 C5 C6 C7 C8 +--- - --- -- -- - -- + + ? ? c ? ? ? ? ? + ? ? c ? ? 2017-01-01 10:10:10.00 1.01000E+000 1 + ? ? ? ? ? ? ? + 1 1 averylongstring -1.000E+000 0 2017-01-01 10:10:10.00 1.00010E+002 1 + 2 2 good 1.100E+000 2 2017-01-01 10:10:10.00 2.0E+002 1000 + 3 3 good 1.000E+000 2 2017-01-01 10:10:10.00 2.1E+002 10 + ?4294967295 good 3.399E+038 ? 2017-01-01 10:10:10.00 1.69968E+308 10 + 099 bad ? ? ? ? ? + +--- 8 row(s) selected. +>>cqd HIVE_SCAN_SPECIAL_MODE reset; + +--- SQL operation complete. +>>drop table if exists trafodion.seabase.traf_tbl_bad; + +--- SQL operation complete. +>>create table trafodion.seabase.traf_tbl_bad ( ++>c1 int, ++>c2 largeint, ++>c3 varchar(25), ++>c4 real, ++>c5 smallint, ++>c6 timestamp(6), ++>c7 float(54), ++>c8 smallint ++>); + +--- SQL operation complete. +>>load with no output into trafodion.seabase.traf_tbl_bad select * from tbl_bad; + +*** ERROR[8413] The string argument contains characters that cannot be converted. + +--- 0 row(s) loaded. +>>insert into trafodion.seabase.traf_tbl_bad select * from tbl_bad; + +*** ERROR[8413] The string argument contains characters that cannot be converted. + +--- 0 row(s) inserted. +>>upsert into trafodion.seabase.traf_tbl_bad select * from tbl_bad; + +*** ERROR[8413] The string argument contains characters that cannot be converted. + +--- 0 row(s) inserted. +>>cqd HIVE_SCAN_SPECIAL_MODE '2'; + +--- SQL operation complete. +>>load with no output into trafodion.seabase.traf_tbl_bad select * from tbl_bad; + +--- 8 row(s) loaded. +>>insert into trafodion.seabase.traf_tbl_bad select * from tbl_bad; + +--- 8 row(s) inserted. +>>upsert into trafodion.seabase.traf_tbl_bad select * from tbl_bad; + +--- 8 row(s) inserted. +>>cqd HIVE_SCAN_SPECIAL_MODE reset; + +--- SQL operation complete. +>>drop table if exists trafodion.seabase.traf_tbl_bad; + +--- SQL operation complete. +>>create table trafodion.seabase.traf_tbl_bad ( ++>c1 int not null, ++>c2 largeint not null, ++>c3 varchar(25), ++>c4 real, ++>c5 smallint, ++>c6 timestamp(6) not null, ++>c7 float(54) not null, ++>c8 smallint ++>); + +--- SQL operation complete. +>>cqd HIVE_SCAN_SPECIAL_MODE '2'; + +--- SQL operation complete. +>>insert into trafodion.seabase.traf_tbl_bad select * from tbl_bad; + --- End diff -- It might be helpful if the original conversion error is added as a warning. Maybe based on some setting(cqd), warnings could be added and returned. One can also check for max number of warnings instead of adding all of them. But that is not a hard requirement for now. --- If y
[GitHub] incubator-trafodion pull request: [TRAFODION-1920] suppress SQL er...
Github user anoopsharma00 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/441#discussion_r61702049 --- Diff: core/sql/exp/exp_eval.cpp --- @@ -862,7 +862,17 @@ ex_expr::exp_return_type ex_expr::evalClauses(ex_clause *clause, atp1->setDiagsArea(diagsArea); if (retcode == ex_expr::EXPR_ERROR) - return retcode; + { +if((getPCodeMode() & ex_expr::ERROR_CONTINUE) > 0) +{ + ExpTupleDesc::setNullValue( op_data[0], + clause->getOperand(0)->getNullBitIndex(), + clause->getOperand(0)->getTupleFormat() ); + retcode = ex_expr::EXPR_OK; --- End diff -- Couple things: Codegen time: The flag to move null in case of an error should be set only if target is nullable. Runtime: Expr code should check to make sure that target is nullable before moving the null value. If target is non-nullable, then original error should be returned. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request: [TRAFODION-1920] suppress SQL er...
Github user anoopsharma00 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/441#discussion_r61689196 --- Diff: core/sql/exp/exp_eval.cpp --- @@ -3003,7 +3014,7 @@ ex_expr::exp_return_type ex_expr::evalPCode(PCodeBinary* pCode32, if (diagsArea != atp1->getDiagsArea()) atp1->setDiagsArea(diagsArea); if (er == ex_expr::EXPR_ERROR) - return ex_expr::EXPR_ERROR; + return ex_expr::EXPR_ERROR; --- End diff -- indentation has changed at many places with the new code. Not sure what editor was used. Will be better to keep the older indentation. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request: [TRAFODION-1920] suppress SQL er...
Github user anoopsharma00 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/441#discussion_r61689151 --- Diff: core/sql/exp/exp_eval.cpp --- @@ -862,7 +862,17 @@ ex_expr::exp_return_type ex_expr::evalClauses(ex_clause *clause, atp1->setDiagsArea(diagsArea); if (retcode == ex_expr::EXPR_ERROR) - return retcode; + { +if((getPCodeMode() & ex_expr::ERROR_CONTINUE) > 0) +{ + ExpTupleDesc::setNullValue( op_data[0], + clause->getOperand(0)->getNullBitIndex(), + clause->getOperand(0)->getTupleFormat() ); + retcode = ex_expr::EXPR_OK; --- End diff -- -- this code also will return back from line #871 on the first conversion clause error instead of continuing to the next clause. -- it will also not work correctly if getPCodeMode() is not set. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request: [TRAFODION-1920] suppress SQL er...
Github user anoopsharma00 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/441#discussion_r61689153 --- Diff: core/sql/exp/exp_eval.cpp --- @@ -862,7 +862,17 @@ ex_expr::exp_return_type ex_expr::evalClauses(ex_clause *clause, atp1->setDiagsArea(diagsArea); if (retcode == ex_expr::EXPR_ERROR) - return retcode; + { +if((getPCodeMode() & ex_expr::ERROR_CONTINUE) > 0) +{ + ExpTupleDesc::setNullValue( op_data[0], + clause->getOperand(0)->getNullBitIndex(), + clause->getOperand(0)->getTupleFormat() ); + retcode = ex_expr::EXPR_OK; +} +else + return retcode; + } --- End diff -- -- This change should be inside of ex_conv_clause::eval when an error happens and not in the mainline. -- a new flag bit should be set at code generation time in ex_conv_clause (something like NullOnError). This flag bit will be checked in ex_conv_clause::eval method. That way handling of this case of NullOnError will be contained within that method. That method should return ok after moving null value to target in case of error. -- No need to have a new pcode mode. The ERROR_CONTINUE setting could be removed -- No change will be needed in mainline exp eval code --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request: [TRAFODION-1920] suppress SQL er...
Github user anoopsharma00 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/441#discussion_r61689166 --- Diff: core/sql/exp/exp_eval.cpp --- @@ -2953,6 +2963,7 @@ ex_expr::exp_return_type ex_expr::evalPCode(PCodeBinary* pCode32, Int32 srcLen = 0; PTR_DEF_ASSIGN(char, dst, 0); BASE_PTR_DEF_ASSIGN(char, src, 2); + BASE_PTR_DEF_ASSIGN(char, rowstart, 0); --- End diff -- what is rowstart used for? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request: Various fixes (details below)
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/444 Various fixes (details below) -- ddl_transactions cqd is now on by default. All ddl, where allowed and supported, will run within one transaction -- drop schema has been disabled to run within one transaction. When jira 1948 is fixed, it will be enabled. -- hdfs scan handles hive col values > 32K -- pcode handles varchar with len > 32K -- errors (gaps, unsorted order) for cqd values in nadefaults are detected without crashing arkcmp. -- volatile and regular schema drop returns the reason if an error occured (for ex: name of objects that could not be dropped) -- dateformat displays european format correctly with a blank seperator between date and time values -- dateformat timestamp in usa format displayes time with AM/PM -- dateformat inside a cast function returns correct values. You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ddlxns2_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/444.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #444 commit e1e727cbfb102a26d6fd0f06c8ad746f7fc64fa0 Author: Cloud User <centos@ansharma-3.novalocal> Date: 2016-04-11T17:53:34Z ddl xns default plus handling of errors with default constants placement commit 6b45e1773d8be613431116c9b021e7dd03025b3d Author: Cloud User <centos@ansharma-3.novalocal> Date: 2016-04-12T01:08:27Z Merge remote branch 'origin/master' into ddlxns2_br commit 54ff2911c29bb0a0500cebefdfb158dbad989937 Author: Cloud User <centos@ansharma-3.novalocal> Date: 2016-04-12T14:19:22Z Merge remote branch 'origin/master' into ddlxns2_br commit eded5a15397aab8d118cf4c246a48e9e7d027874 Author: Cloud User <centos@ansharma-3.novalocal> Date: 2016-04-20T00:27:41Z Merge remote branch 'origin/master' into ddlxns2_br commit b7a6e54d8ea4043f0d736dcd43e8f45ef8a14b30 Author: Cloud User <centos@ansharma-3.novalocal> Date: 2016-04-21T15:19:00Z Merge remote branch 'origin/master' into ddlxns2_br commit 1c52a1b4ef645c8c8be87b8dab132ae07bc621b6 Author: Anoop Sharma <centos@ansharma-3.novalocal> Date: 2016-04-21T22:21:59Z Various fixes (details below) -- ddl_transactions cqd is now on by default. All ddl, where allowed and supported, will run within one transaction -- drop schema has been disabled to run within one transaction. When jira 1948 is fixed, it will be enabled. -- hdfs scan handles hive col values > 32K -- pcode handles varchar with len > 32K -- errors (gaps, unsorted order) for cqd values in nadefaults are detected without crashing arkcmp. -- volatile and regular schema drop returns the reason if an error occured (for ex: name of objects that could not be dropped) -- dateformat displays european format correctly with a blank seperator between date and time values -- dateformat timestamp in usa format displayes time with AM/PM -- dateformat inside a cast function returns correct values. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request: various fixes
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/420 various fixes -- Implicit xns for ddl stmts are now started in master exe if autocommit is OFF -- default values for varchar columns are now handled correctly -- DATEFORMAT function on timestamp values are now handled correctly -- CREATE/DROP PROCEDURE stmt are now handled correctly with DDL xns. -- alter primary key stmt now returns an error if table already has a user defined primary/clustering key -- regress/core/TEST116, seabase/TEST030,031 have been updated with new tests You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ddlxns_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/420.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #420 commit 236e26d374605974e39bb9c3063cb6494418be87 Author: Cloud User <centos@ansharma-3.novalocal> Date: 2016-04-01T04:18:53Z commit #1 commit 90eafe9cb821fa90359c088d5a8f3fa66e2df4e1 Author: Cloud User <centos@ansharma-3.novalocal> Date: 2016-04-01T04:19:12Z Merge remote branch 'origin/master' into ddlxns_br commit 9a9b4c68e248b845b2c1001f3dc9ab3a4c9873c1 Author: Cloud User <centos@ansharma-3.novalocal> Date: 2016-04-02T14:00:36Z Merge remote branch 'origin/master' into ddlxns_br commit 44f28db2244427aaa8e5f2bfd1d7ebe0eca9fca5 Author: Cloud User <centos@ansharma-3.novalocal> Date: 2016-04-04T17:53:14Z Merge remote branch 'origin/master' into ddlxns_br commit ba6a1f2fdc233534cef0b2dd07d2db33b6722c93 Author: Cloud User <centos@ansharma-3.novalocal> Date: 2016-04-06T14:55:12Z Merge remote branch 'origin/master' into ddlxns_br commit 9b779ccbc7276d2aed3316faed6d745357d2f753 Author: Cloud User <centos@ansharma-3.novalocal> Date: 2016-04-07T14:31:19Z Merge remote branch 'origin/master' into ddlxns_br commit 9be5d50367fed69f83750f5e63098812bb011e72 Author: Anoop Sharma <ansharma@edev06.esgyn.local> Date: 2016-04-07T15:23:57Z Various fixes -- Implicit xns for ddl stmts are now started in master exe if autocommit is OFF -- default values for varchar columns are now handled correctly -- DATEFORMAT function on timestamp values are now handled correctly -- CREATE/DROP PROCEDURE stmt are now handled correctly with DDL xns. -- alter primary key stmt now returns an error if table already has a user defined primary/clustering key -- regress/core/TEST116, seabase/TEST030,031 have been updated with new tests --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request: JIRA TRAFODION-1901 Default clau...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/398 JIRA TRAFODION-1901 Default clause can appear in any order during create Default clause can now appear in any order during column definition of a create table or alter table statement. One can specify any mix of "not null", "default", "constraint..." and other column attributes. You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion defclause_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/398.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #398 commit 59b3d03d2a7878caad396d3d9b2bbee6a3b86bce Author: Anoop Sharma <ansharma@edev06.esgyn.local> Date: 2016-03-21T15:36:30Z JIRA TRAFODION-1901 Default clause can appear in any order during create. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request: JIRA 1899, Various fixes. Detail...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/391 JIRA 1899, Various fixes. Details below. -- time datatype with no fraction precision was not getting converted correctly and was putting out null characters. -- dateformat usa was not displaying AM/PM with time datatype -- update of primary key that got transformed into delete/insert would incorrectly delete the row if insert ran into an error -- rename cascade option is not supported. An error is now returned. -- rename table with check constraint is not supported. An error is now returned. -- add/drop of primary key constraint now gives consistent behavior. Primary key columns are used as clustering key if primary key constraint is specified during create table. Primary key constraint creates a unique index if it is specified after create table and no user specified primary or store by clause was specified during create. Drop of primary key constraint succeeds only if that primary key is not the clustering key. -- invalid ddl with salt clause no longer crashes and returns an error instead. -- parser now gives a syntax error on MV and Triggers queries since these features are not externalized. -- regress/seabase/TEST031 has been added for misc fixes You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_fixes_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/391.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #391 commit 7c7ca5f3941f6a6d2141b1b91dac5c70e81d210f Author: Cloud User <centos@ansharma-2.novalocal> Date: 2016-03-17T19:59:28Z JIRA 1899, Various fixes. Details below. -- time datatype with no fraction precision was not getting converted correctly and was putting out null characters. -- dateformat usa was not displaying AM/PM with time datatype -- update of primary key that got transformed into delete/insert would incorrectly delete the row if insert ran into an error -- rename cascade option is not supported. An error is now returned. -- rename table with check constraint is not supported. An error is now returned. -- add/drop of primary key constraint now gives consistent behavior. Primary key columns are used as clustering key if primary key constraint is specified during create table. Primary key constraint creates a unique index if it is specified after create table and no user specified primary or store by clause was specified during create. Drop of primary key constraint succeeds only if that primary key is not the clustering key. -- invalid ddl with salt clause no longer crashes and returns an error instead. -- parser now gives a syntax error on MV and Triggers queries since these features are not externalized. -- regress/seabase/TEST031 has been added for misc fixes --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request: JIRA 1852: disallow reserved nam...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/390 JIRA 1852: disallow reserved names as user columns You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion resrvdcols_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/390.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #390 commit a3af80d590d3e31e268c38e728aa7a31a482aaf3 Author: Cloud User <centos@ansharma-3.novalocal> Date: 2016-03-13T22:13:35Z commit #1 commit db44c1d716d44e07f5d01ba13d01b1cc4fdd2d3b Author: Cloud User <centos@ansharma-3.novalocal> Date: 2016-03-13T22:13:44Z Merge remote branch 'origin/master' into resrvdcols_br commit 57a7566fab823bc45a01121cfa953bff18504378 Author: Cloud User <centos@ansharma-3.novalocal> Date: 2016-03-16T22:55:51Z Merge remote branch 'origin/master' into resrvdcols_br commit a33ee6b9a6aa3186508ca528ffe744e4d4ea8f18 Author: Cloud User <centos@ansharma-3.novalocal> Date: 2016-03-16T23:07:20Z commit #2 commit 950a303f36591af03814a892694289edeb968f8e Author: Cloud User <centos@ansharma-3.novalocal> Date: 2016-03-17T01:46:23Z Merge remote branch 'origin/master' into resrvdcols_br Conflicts: core/sql/common/ComMisc.cpp core/sql/optimizer/BindItemExpr.cpp core/sql/regress/seabase/EXPECTED020 core/sql/regress/seabase/TEST020 core/sql/sqlcomp/nadefaults.cpp commit 5cdf688ff81d3813f233af90fbc376f6d65deca2 Author: Cloud User <centos@ansharma-3.novalocal> Date: 2016-03-17T15:16:15Z JIRA 1852: disallow reserved names as user columns commit 14b17ddd9c591eb75bf9a9a0dc5c085f3c7dee04 Author: Cloud User <centos@ansharma-3.novalocal> Date: 2016-03-17T15:56:54Z JIRA 1852: disallow reserved names as user columns --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request: JIRA 1849 Add support for alter ...
Github user anoopsharma00 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/381#discussion_r56413042 --- Diff: core/sql/common/NAString.cpp --- @@ -280,6 +280,29 @@ NAString Int64ToNAString(Int64 l) return NAString(resultstr); } +NAString (NAString , const NAString , + const NAString ) +{ + size_t indexOfReplace = NA_NPOS; + indexOfReplace = source.index(searchFor); + if (indexOfReplace != NA_NPOS) --- End diff -- yes, that is true. This method was moved from sqlcomp/CmpDescribe.cpp to common dir and is not new code. Will fix it in a later checkin. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request: JIRA 1852: disallow reserved nam...
Github user anoopsharma00 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/390#discussion_r56667942 --- Diff: core/sql/common/ComMisc.cpp --- @@ -228,3 +228,17 @@ NAString ComConvertTrafNameToNativeName( return convertedName; } +NABoolean ComTrafReservedColName( + const NAString ) --- End diff -- If column is not delimited, then it will be upcased when this method is called. If column is delimited ("a"), then it will retain the original case. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request: updated expected file for test00...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/384 updated expected file for test006 diffs You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/384.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #384 commit 25b042819874d4fb99f243bad30899353536ab7f Author: Cloud User <ansha...@apache.org> Date: 2016-03-13T17:41:21Z updated expected file for test006 diffs --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request: JIRA 1849 Add support for alter ...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/381 JIRA 1849 Add support for alter column rename (details below) -- support for 'add column c rename to newc' -- fixed issue with ddl stmts and aqr, it now works correctly if ddl_transactions are being used -- drop table with views now drops them in reverse creation order. That way dependent views are dropped correctly. -- views are dropped before and recreated after an alter column statement. -- dev regressions tests now show system columns in invoke. -- index uid is now stored in desc and NATable structs You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion altcolren_br_deliver Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/381.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #381 commit d406cc524027bd07380db4e6c0726c6e76c349e4 Author: Cloud User <centos@ansharma-3.novalocal> Date: 2016-03-13T01:32:25Z JIRA 1849 Add support for alter column rename (details below) -- support for 'add column c rename to newc' -- fixed issue with ddl stmts and aqr, it now works correctly if ddl_transactions are being used -- drop table with views now drops them in reverse creation order. That way dependent views are dropped correctly. -- views are dropped before and recreated after an alter column statement. -- dev regressions tests now show system columns in invoke. -- index uid is now stored in desc and NATable structs --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request: JIRA TRAFODION-1798 (ddl xns) an...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/346 JIRA TRAFODION-1798 (ddl xns) and few other fixes, details below. -- support for sql part of ddl xns. Section 1 of JIRA TRAFODION-1798 -- cqd ddl_transactions to enable or disable ddl xns. Default is currently off. Once it is tested, it will be turned on. Dev regressions are run with cqd set to ON -- get stmts run with read committed to get changes in current xns -- support for where preds with get stmts -- scan to pass in transid even if running with read uncommitted access. This enables rows modified in current xn to be returned. -- cleanup no longer return multiple duplicate error messages if objects id is not found. -- cleanup no longer includes internallay created schemas (_HV_ , _HB_) during cleanup operations. -- Correct error msg was not getting returned if an invalid index existed in table and the same index was created again. -- init traf, drop md views was giving an error if views didnt exist. That has been fixed. -- regressions with -diff option now show original file timestamps instead of the timestamp when the diff command was run. You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion deliver2_dt_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/346.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #346 commit cd9f7a1ae65ac4aca485fb30b98daf8a1ccce885 Author: Cloud User <ansha...@apache.org> Date: 2016-02-29T05:39:02Z JIRA TRAFODION-1798 (ddl xns) and few other fixes, details below. -- support for sql part of ddl xns. Section 1 of JIRA TRAFODION-1798 -- cqd ddl_transactions to enable or disable ddl xns. Default is currently off. Once it is tested, it will be turned on. Dev regressions are run with cqd set to ON -- get stmts run with read committed to get changes in current xns -- support for where preds with get stmts -- scan to pass in transid even if running with read uncommitted access. This enables rows modified in current xn to be returned. -- cleanup no longer return multiple duplicate error messages if objects id is not found. -- cleanup no longer includes internallay created schemas (_HV_ , _HB_) during cleanup operations. -- Correct error msg was not getting returned if an invalid index existed in table and the same index was created again. -- init traf, drop md views was giving an error if views didnt exist. That has been fixed. -- regressions with -diff option now show original file timestamps instead of the timestamp when the diff command was run. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request: JIRA TRAFODION-1844: support for...
Github user anoopsharma00 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/344#discussion_r54324162 --- Diff: core/sql/regress/seabase/EXPECTED027 --- @@ -756,8 +756,381 @@ create index t027t01i2 on t027t01("cf2".b); --- SQL operation failed with errors. >> +>>-- tests for alter varchar column +>>drop table if exists t027t7; + +--- SQL operation complete. +>>create table t027t7(a int not null, b varchar(2), ++> c varchar(4) character set utf8 not null, z int not null primary key) ++>salt using 2 partitions; + +--- SQL operation complete. +>> +>>invoke t027t7; + +-- Definition of Trafodion table TRAFODION.SCH027.T027T7 +-- Definition current Fri Feb 26 20:39:06 2016 + + ( +AINT NO DEFAULT NOT NULL NOT DROPPABLE + , BVARCHAR(2) CHARACTER SET ISO88591 COLLATE + DEFAULT DEFAULT NULL + , CVARCHAR(4 CHARS) CHARACTER SET UTF8 + COLLATE DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE + , ZINT NO DEFAULT NOT NULL NOT DROPPABLE + ) + +--- SQL operation complete. +>>insert into t027t7 values (1, 'ab', 'cd', 10); + +--- 1 row(s) inserted. +>>select * from t027t7; + +AB C Z +--- -- --- + + 1 ab cd 10 + +--- 1 row(s) selected. +>>alter table t027t7 alter column b varchar(3); + +--- SQL operation complete. +>>invoke t027t7; + +-- Definition of Trafodion table TRAFODION.SCH027.T027T7 +-- Definition current Fri Feb 26 20:39:13 2016 + + ( +AINT NO DEFAULT NOT NULL NOT DROPPABLE + , BVARCHAR(3) CHARACTER SET ISO88591 COLLATE + DEFAULT DEFAULT NULL /*altered_col*/ + , CVARCHAR(4 CHARS) CHARACTER SET UTF8 + COLLATE DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE + , ZINT NO DEFAULT NOT NULL NOT DROPPABLE + ) + +--- SQL operation complete. +>>alter table t027t7 alter column c varchar(5) character set utf8; + +--- SQL operation complete. +>>invoke t027t7; + +-- Definition of Trafodion table TRAFODION.SCH027.T027T7 +-- Definition current Fri Feb 26 20:39:35 2016 + + ( +AINT NO DEFAULT NOT NULL NOT DROPPABLE + , BVARCHAR(3) CHARACTER SET ISO88591 COLLATE + DEFAULT DEFAULT NULL /*altered_col*/ + , CVARCHAR(5 CHARS) CHARACTER SET UTF8 + COLLATE DEFAULT DEFAULT NULL /*altered_col*/ + , ZINT NO DEFAULT NOT NULL NOT DROPPABLE + ) + +--- SQL operation complete. +>>alter table t027t7 alter column c varchar(4) character set utf8; + +--- SQL operation complete. +>>invoke t027t7; + +-- Definition of Trafodion table TRAFODION.SCH027.T027T7 +-- Definition current Fri Feb 26 20:39:50 2016 + + ( +AINT NO DEFAULT NOT NULL NOT DROPPABLE + , BVARCHAR(3) CHARACTER SET ISO88591 COLLATE + DEFAULT DEFAULT NULL /*altered_col*/ + , CVARCHAR(4 CHARS) CHARACTER SET UTF8 + COLLATE DEFAULT DEFAULT NULL /*altered_col*/ + , ZINT NO DEFAULT NOT NULL NOT DROPPABLE + ) + +--- SQL operation complete. +>> +>>alter table t027t7 alter column a largeint; + +--- SQL operation complete. +>>invoke t027t7; + +-- Definition of Trafodion table TRAFODION.SCH027.T027T7 +-- Definition current Fri Feb 26 20:40:08 2016 + + ( +ALARGEINT DEFAULT NULL /*altered_col*/ + , BVARCHAR(3) CHARACTER SET ISO88591 COLLATE + DEFAULT DEFAULT NULL /*altered_col*/ + , CVARCHAR(4 CHARS) CHARACTER SET UTF8 + COLLATE DEFAULT DEFAULT NULL /*altered_col*/ + , ZINT NO DEFAULT NOT NULL NOT DROPPABLE + ) + +--- SQL operation complete. +>>alter table t027t7 alter column b varchar(4) character set utf8; + +--- SQL operation complete. +>>invoke t027t7; + +-- Definition of Trafodion table TRAFODION.SCH027.T027T7 +-- Definition current Fri Feb 26 20:40:26 2016 + + ( +A
[GitHub] incubator-trafodion pull request: JIRA TRAFODION-1844: support for...
Github user anoopsharma00 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/344#discussion_r54324170 --- Diff: core/sql/sqlcomp/CmpDescribe.cpp --- @@ -200,11 +200,13 @@ short CmpDescribeSeabaseTable ( NABoolean withoutDivisioning = FALSE, NABoolean noTrailingSemi = FALSE, - // used to add or remove column definition from col list. - // valid for 'createLike' mode. Used for 'alter add/drop col'. + // used to add,rem,alter column definition from col list. + // valid for 'createLike' mode. + // Used for 'alter add/drop/alter col'. char * colName = NULL, - NABoolean isAdd = FALSE, - const NAColumn * nacol = NULL); + short ada = 0, // 0,add. 1,drop. 2,alter --- End diff -- will add it for a subsequent checkin. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request: JIRA TRAFODION-1844: support for...
Github user anoopsharma00 commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/344#discussion_r54324167 --- Diff: core/sql/parser/StmtDDLAlterTableAlterColumn.cpp --- @@ -55,16 +55,22 @@ StmtDDLAlterTableAlterColumn::getText() const // // CLASS StmtDDLAlterTableAlterColumnDatatype // -StmtDDLAlterTableAlterColumnDatatype::StmtDDLAlterTableAlterColumnDatatype( - const NAString - , NAType * natype - , CollHeap *heap) +StmtDDLAlterTableAlterColumnDatatype::StmtDDLAlterTableAlterColumnDatatype( + ElemDDLNode * pColumnToAlter + ,CollHeap* heap) : StmtDDLAlterTableAlterColumn(DDL_ALTER_TABLE_ALTER_COLUMN_DATATYPE, -columnName, +NAString(""), --- End diff -- yes, you are right, it is not needed for this particular case. But we would need it for other column based operations like renaming a column (there is another jira for rename). So we can keep it around and use it for rename implementation. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-trafodion pull request: JIRA 1844: support for 'alter ta...
GitHub user anoopsharma00 opened a pull request: https://github.com/apache/incubator-trafodion/pull/344 JIRA 1844: support for 'alter table alter column datatype' Regression test seabase/TEST027 has been enhanced with alter col tests. You can merge this pull request into a Git repository by running: $ git pull https://github.com/anoopsharma00/incubator-trafodion altercoldt_br Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-trafodion/pull/344.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #344 commit 7b99938cea8ba68f2c90ed655e8f4d85cc24f06f Author: Cloud User <centos@ansharma-3.novalocal> Date: 2016-02-26T23:09:18Z JIRA 1844: support for 'alter table alter column datatype' --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---