{"action":"created","issue":{"url":"https://api.github.com/repos/splicemachine/spliceengine/issues/875","repository_url":"https://api.github.com/repos/splicemachine/spliceengine","labels_url":"https://api.github.com/repos/splicemachine/spliceengine/issues/875/labels{/name}","comments_url":"https://api.github.com/repos/splicemachine/spliceengine/issues/875/comments","events_url":"https://api.github.com/repos/splicemachine/spliceengine/issues/875/events","html_url":"https://github.com/splicemachine/spliceengine/pull/875","id":241802886,"number":875,"title":"SPLICE-1621 Fix select from partitioned orc table error","user":{"login":"tgildersleeve","id":24851569,"avatar_url":"https://avatars0.githubusercontent.com/u/24851569?v=3","gravatar_id":"","url":"https://api.github.com/users/tgildersleeve","html_url":"https://github.com/tgildersleeve","followers_url":"https://api.github.com/users/tgildersleeve/followers","following_url":"https://api.github.com/users/tgildersleeve/following{/other_user}","gists_url":"https://api.github.com/users/tgildersleeve/gists{/gist_id}","starred_url":"https://api.github.com/users/tgildersleeve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgildersleeve/subscriptions","organizations_url":"https://api.github.com/users/tgildersleeve/orgs","repos_url":"https://api.github.com/users/tgildersleeve/repos","events_url":"https://api.github.com/users/tgildersleeve/events{/privacy}","received_events_url":"https://api.github.com/users/tgildersleeve/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-07-10T18:25:17Z","updated_at":"2017-07-11T18:41:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/splicemachine/spliceengine/pulls/875","html_url":"https://github.com/splicemachine/spliceengine/pull/875","diff_url":"https://github.com/splicemachine/spliceengine/pull/875.diff","patch_url":"https://github.com/splicemachine/spliceengine/pull/875.patch"},"body":"previously, selecting columns from a partitioned orc table would throw an error if it was partitioned by any column other than the last. in ValueRow, createStructType() could return columns that weren't selected. OrcRecordReader had some index issues where the partitioned column would be listed last in the query results, and the true last column would be chopped off."},"comment":{"url":"https://api.github.com/repos/splicemachine/spliceengine/issues/comments/314535359","html_url":"https://github.com/splicemachine/spliceengine/pull/875#issuecomment-314535359","issue_url":"https://api.github.com/repos/splicemachine/spliceengine/issues/875","id":314535359,"user":{"login":"snowspeeder","id":529863,"avatar_url":"https://avatars3.githubusercontent.com/u/529863?v=3","gravatar_id":"","url":"https://api.github.com/users/snowspeeder","html_url":"https://github.com/snowspeeder","followers_url":"https://api.github.com/users/snowspeeder/followers","following_url":"https://api.github.com/users/snowspeeder/following{/other_user}","gists_url":"https://api.github.com/users/snowspeeder/gists{/gist_id}","starred_url":"https://api.github.com/users/snowspeeder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snowspeeder/subscriptions","organizations_url":"https://api.github.com/users/snowspeeder/orgs","repos_url":"https://api.github.com/users/snowspeeder/repos","events_url":"https://api.github.com/users/snowspeeder/events{/privacy}","received_events_url":"https://api.github.com/users/snowspeeder/received_events","type":"User","site_admin":false},"created_at":"2017-07-11T18:41:09Z","updated_at":"2017-07-11T18:41:09Z","body":"Ok, then should you add an assert check there just so that there are no\narray bound issues.\n\nOn Tue, Jul 11, 2017 at 11:38 AM, tgildersleeve <notifications@github.com>\nwrote:\n\n> *@tgildersleeve* commented on this pull request.\n> ------------------------------\n>\n> In db-engine/src/main/java/com/splicemachine/db/impl/sql/\n> execute/ValueRow.java\n> <https://github.com/splicemachine/spliceengine/pull/875#discussion_r126773750>\n> :\n>\n> > @@ -623,6 +623,21 @@ public StructType createStructType() {\n>  \t\t}\n>  \t\treturn DataTypes.createStructType(fields);\n>  \t}\n> +\n> +\t@Override // SPLICE-1621\n> +\tpublic StructType createStructTypeCorrected(int[] baseColumnMap) {\n> +\t\tStructField[] fields = new StructField[length()];\n> +\t\tint j = 0;\n> +\t\tfor(int i = 0; i < baseColumnMap.length; i++){\n> +\t\t\tif (baseColumnMap[i] != -1){\n> +\t\t\t\t// put the selected columns, designated in baseColumnMap, in field\n> +\t\t\t\tfields[j] = getColumn(j+1).getStructField(getNamedColumn(i));\n> +\t\t\t\tj++;\n> +\t\t\t}\n>\n> so the number of columns in baseColumnMap that are not -1 is the same as\n> length() and fields.length\n>\n> —\n> You are receiving this because your review was requested.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/splicemachine/spliceengine/pull/875#discussion_r126773750>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/AAgVx0iV_UvrjEcbTQ6ls8SlytO3WUSCks5sM8ElgaJpZM4OTOZ7>\n> .\n>\n"}}
{"actor":{"display_login":"snowspeeder"}}