{"action":"closed","issue":{"url":"https://api.github.com/repos/facebook/presto/issues/3670","labels_url":"https://api.github.com/repos/facebook/presto/issues/3670/labels{/name}","comments_url":"https://api.github.com/repos/facebook/presto/issues/3670/comments","events_url":"https://api.github.com/repos/facebook/presto/issues/3670/events","html_url":"https://github.com/facebook/presto/issues/3670","id":108168717,"number":3670,"title":"Implement copyPositions for AbstractArrayBlock and AbstractInterleavedBlock","user":{"login":"haozhun","id":2020503,"avatar_url":"https://avatars.githubusercontent.com/u/2020503?v=3","gravatar_id":"","url":"https://api.github.com/users/haozhun","html_url":"https://github.com/haozhun","followers_url":"https://api.github.com/users/haozhun/followers","following_url":"https://api.github.com/users/haozhun/following{/other_user}","gists_url":"https://api.github.com/users/haozhun/gists{/gist_id}","starred_url":"https://api.github.com/users/haozhun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haozhun/subscriptions","organizations_url":"https://api.github.com/users/haozhun/orgs","repos_url":"https://api.github.com/users/haozhun/repos","events_url":"https://api.github.com/users/haozhun/events{/privacy}","received_events_url":"https://api.github.com/users/haozhun/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"haozhun","id":2020503,"avatar_url":"https://avatars.githubusercontent.com/u/2020503?v=3","gravatar_id":"","url":"https://api.github.com/users/haozhun","html_url":"https://github.com/haozhun","followers_url":"https://api.github.com/users/haozhun/followers","following_url":"https://api.github.com/users/haozhun/following{/other_user}","gists_url":"https://api.github.com/users/haozhun/gists{/gist_id}","starred_url":"https://api.github.com/users/haozhun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haozhun/subscriptions","organizations_url":"https://api.github.com/users/haozhun/orgs","repos_url":"https://api.github.com/users/haozhun/repos","events_url":"https://api.github.com/users/haozhun/events{/privacy}","received_events_url":"https://api.github.com/users/haozhun/received_events","type":"User","site_admin":false},"milestone":null,"comments":0,"created_at":"2015-09-24T16:45:34Z","updated_at":"2015-09-25T22:34:59Z","closed_at":"2015-09-25T22:34:59Z","body":"`copyPositions` was introduced in #3346 for dictionary block compaction. At the time, it was only implemented for blocks where dictionary compaction could happen. Last week, #3605 changed OrcReader to return Blocks instead of Vectors. It introduced a new use case for copyPositions: remove positions in map blocks whose key is null. This require that `copyPosition` be implemented on all blocks.\r\n \r\n```\r\njava.lang.UnsupportedOperationException\r\ncom.facebook.presto.spi.block.AbstractArrayBlock.copyPositions(AbstractArrayBlock.java:46)\r\ncom.facebook.presto.orc.reader.MapStreamReader.createKeyValueBlock(MapStreamReader.java:189)\r\ncom.facebook.presto.orc.reader.MapStreamReader.readBlock(MapStreamReader.java:146)\r\ncom.facebook.presto.orc.OrcRecordReader.readBlock(OrcRecordReader.java:280)\r\ncom.facebook.presto.hive.orc.OrcPageSource$OrcBlockLoader.load(OrcPageSource.java:313)\r\ncom.facebook.presto.hive.orc.OrcPageSource$OrcBlockLoader.load(OrcPageSource.java:289)\r\ncom.facebook.presto.spi.block.LazyBlock.assureLoaded(LazyBlock.java:246)\r\ncom.facebook.presto.spi.Page.assureLoaded(Page.java:111)\r\ncom.facebook.presto.operator.TableScanOperator.getOutput(TableScanOperator.java:242)\r\ncom.facebook.presto.operator.Driver.processInternal(Driver.java:380)\r\ncom.facebook.presto.operator.Driver.processFor(Driver.java:303)\r\ncom.facebook.presto.execution.SqlTaskExecution$DriverSplitRunner.processFor(SqlTaskExecution.java:587)\r\ncom.facebook.presto.execution.TaskExecutor$PrioritizedSplitRunner.process(TaskExecutor.java:505)\r\ncom.facebook.presto.execution.TaskExecutor$Runner.run(TaskExecutor.java:640)\r\njava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\r\njava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\r\njava.lang.Thread.run(Thread.java:745)\r\n```"}}