{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/presto/pulls/comments/41579854","id":41579854,"diff_hunk":"@@ -1440,94 +1513,251 @@ protected void doCreateTable(SchemaTableName tableName, HiveStorageFormat storag\n         // verify the metadata\n         tableMetadata = metadata.getTableMetadata(SESSION, getTableHandle(tableName));\n         assertEquals(tableMetadata.getOwner(), SESSION.getUser());\n+        assertEquals(tableMetadata.getColumns(), CREATE_TABLE_COLUMNS);\n \n-        Map<String, ColumnMetadata> columnMap = uniqueIndex(tableMetadata.getColumns(), ColumnMetadata::getName);\n+        // verify the data\n+        MaterializedResult result = readTable(tableHandle, columnHandles, SESSION, TupleDomain.all(), OptionalInt.empty(), Optional.of(storageFormat));\n+        assertEqualsIgnoreOrder(result.getMaterializedRows(), CREATE_TABLE_DATA.getMaterializedRows());\n+    }\n \n-        assertPrimitiveField(columnMap, \"id\", BIGINT, false);\n-        assertPrimitiveField(columnMap, \"t_string\", VARCHAR, false);\n-        assertPrimitiveField(columnMap, \"t_bigint\", BIGINT, false);\n-        assertPrimitiveField(columnMap, \"t_double\", DOUBLE, false);\n-        assertPrimitiveField(columnMap, \"t_boolean\", BOOLEAN, false);\n+    protected void doCreateEmptyTable(SchemaTableName tableName, HiveStorageFormat storageFormat, List<ColumnMetadata> createTableColumns)\n+            throws Exception\n+    {\n+        List<String> partitionedBy = createTableColumns.stream()\n+                .filter(ColumnMetadata::isPartitionKey)\n+                .map(ColumnMetadata::getName)\n+                .collect(toList());\n+        ConnectorTableMetadata tableMetadata = new ConnectorTableMetadata(tableName, createTableColumns, createTableProperties(storageFormat, partitionedBy), SESSION.getUser());\n \n-        // verify the data\n-        List<ConnectorTableLayoutResult> tableLayoutResults = metadata.getTableLayouts(SESSION, tableHandle, new Constraint<>(TupleDomain.all(), bindings -> true), Optional.empty());\n-        ConnectorTableLayoutHandle layoutHandle = getOnlyElement(tableLayoutResults).getTableLayout().getHandle();\n-        assertEquals(getAllPartitions(layoutHandle).size(), 1);\n-        ConnectorSplitSource splitSource = splitManager.getSplits(SESSION, layoutHandle);\n-        ConnectorSplit split = getOnlyElement(getAllSplits(splitSource));\n+        metadata.createTable(SESSION, tableMetadata);\n \n-        try (ConnectorPageSource pageSource = pageSourceProvider.createPageSource(SESSION, split, columnHandles)) {\n-            assertPageSourceType(pageSource, storageFormat);\n-            MaterializedResult result = materializeSourceDataStream(SESSION, pageSource, getTypes(columnHandles));\n-            assertEquals(result.getRowCount(), 3);\n+        // load the new table\n+        ConnectorTableHandle tableHandle = getTableHandle(tableName);\n \n-            MaterializedRow row;\n+        // verify the metadata\n+        tableMetadata = metadata.getTableMetadata(SESSION, getTableHandle(tableName));\n+        assertEquals(tableMetadata.getOwner(), SESSION.getUser());\n+        assertEquals(tableMetadata.getColumns(), createTableColumns);\n \n-            row = result.getMaterializedRows().get(0);\n-            assertEquals(row.getField(0), 1L);\n-            assertEquals(row.getField(1), \"hello\");\n-            assertEquals(row.getField(2), 123L);\n-            assertEquals(row.getField(3), 43.5);\n-            assertEquals(row.getField(4), true);\n+        // verify table format\n+        Table table = getMetastoreClient(tableName.getSchemaName()).getTable(tableName.getSchemaName(), tableName.getTableName()).get();\n+        if (!table.getSd().getInputFormat().equals(storageFormat.getInputFormat())) {\n+            assertEquals(table.getSd().getInputFormat(), storageFormat.getInputFormat());\n+        }\n \n-            row = result.getMaterializedRows().get(1);\n-            assertEquals(row.getField(0), 2L);\n-            assertNull(row.getField(1));\n-            assertNull(row.getField(2));\n-            assertNull(row.getField(3));\n-            assertNull(row.getField(4));\n+        // verify the table is empty\n+        List<ColumnHandle> columnHandles = ImmutableList.copyOf(metadata.getColumnHandles(SESSION, tableHandle).values());\n+        MaterializedResult result = readTable(tableHandle, columnHandles, SESSION, TupleDomain.all(), OptionalInt.empty(), Optional.of(storageFormat));\n+        assertEquals(result.getRowCount(), 0);\n+    }\n \n-            row = result.getMaterializedRows().get(2);\n-            assertEquals(row.getField(0), 3L);\n-            assertEquals(row.getField(1), \"bye\");\n-            assertEquals(row.getField(2), 456L);\n-            assertEquals(row.getField(3), 98.1);\n-            assertEquals(row.getField(4), false);\n+    private void doInsert(HiveStorageFormat storageFormat, SchemaTableName tableName)\n+            throws Exception\n+    {\n+        // creating the table\n+        doCreateEmptyTable(tableName, storageFormat, CREATE_TABLE_COLUMNS);\n+\n+        MaterializedResult.Builder resultBuilder = MaterializedResult.resultBuilder(SESSION, CREATE_TABLE_DATA.getTypes());\n+        for (int i = 0; i < 3; i++) {\n+            // begin the insert\n+            ConnectorTableHandle tableHandle = getTableHandle(tableName);\n+            ConnectorInsertTableHandle insertTableHandle = metadata.beginInsert(SESSION, tableHandle);\n+\n+            ConnectorPageSink sink = pageSinkProvider.createPageSink(SESSION, insertTableHandle);\n+\n+            // write data\n+            sink.appendPage(CREATE_TABLE_DATA.toPage(), null);\n+            Collection<Slice> fragments = sink.commit();\n+\n+            // commit the insert\n+            metadata.commitInsert(SESSION, insertTableHandle, fragments);\n+\n+            // load the new table\n+            List<ColumnHandle> columnHandles = ImmutableList.copyOf(metadata.getColumnHandles(SESSION, tableHandle).values());\n+\n+            // verify the metadata\n+            ConnectorTableMetadata tableMetadata = metadata.getTableMetadata(SESSION, getTableHandle(tableName));\n+            assertEquals(tableMetadata.getOwner(), SESSION.getUser());\n+            assertEquals(tableMetadata.getColumns(), CREATE_TABLE_COLUMNS);\n+\n+            // verify the data\n+            resultBuilder.rows(CREATE_TABLE_DATA.getMaterializedRows());\n+            MaterializedResult result = readTable(tableHandle, columnHandles, SESSION, TupleDomain.<ColumnHandle>all(), OptionalInt.empty(), Optional.empty());\n+            assertEqualsIgnoreOrder(result.getMaterializedRows(), resultBuilder.build().getMaterializedRows());\n         }\n+\n+        // test rollback\n+        Set<String> existingFiles = listAllDataFiles(tableName.getSchemaName(), tableName.getTableName());\n+        assertFalse(existingFiles.isEmpty());\n+\n+        ConnectorTableHandle tableHandle = getTableHandle(tableName);\n+        List<ColumnHandle> columnHandles = ImmutableList.copyOf(metadata.getColumnHandles(SESSION, tableHandle).values());\n+\n+        // \"stage\" insert data\n+        ConnectorInsertTableHandle insertTableHandle = metadata.beginInsert(SESSION, tableHandle);\n+        ConnectorPageSink sink = pageSinkProvider.createPageSink(SESSION, insertTableHandle);\n+        sink.appendPage(CREATE_TABLE_DATA.toPage(), null);\n+        sink.appendPage(CREATE_TABLE_DATA.toPage(), null);\n+        sink.commit();\n+\n+        // verify we did not modify the table directory\n+        assertEquals(listAllDataFiles(tableName.getSchemaName(), tableName.getTableName()), existingFiles);\n+\n+        // verify all temp files start with the unique prefix\n+        Set<String> tempFiles = listAllDataFiles(insertTableHandle);\n+        assertTrue(!tempFiles.isEmpty());\n+        for (String filePath : tempFiles) {\n+            assertTrue(new Path(filePath).getName().startsWith(getFilePrefix(insertTableHandle)));\n+        }\n+\n+        // rollback insert\n+        metadata.rollbackInsert(SESSION, insertTableHandle);\n+\n+        // verify the data is unchanged\n+        MaterializedResult result = readTable(tableHandle, columnHandles, SESSION, TupleDomain.<ColumnHandle>all(), OptionalInt.empty(), Optional.empty());\n+        assertEqualsIgnoreOrder(result.getMaterializedRows(), resultBuilder.build().getMaterializedRows());\n+\n+        // verify we did not modify the table directory\n+        assertEquals(listAllDataFiles(tableName.getSchemaName(), tableName.getTableName()), existingFiles);\n+\n+        // verify temp directory is empty\n+        assertTrue(listAllDataFiles(insertTableHandle).isEmpty());\n+    }\n+\n+    // These are protected so extensions to the hive connector can replace the handle classes\n+    protected String getFilePrefix(ConnectorOutputTableHandle outputTableHandle)\n+    {\n+        return ((HiveOutputTableHandle) outputTableHandle).getFilePrefix();\n+    }\n+\n+    protected String getFilePrefix(ConnectorInsertTableHandle insertTableHandle)\n+    {\n+        return ((HiveInsertTableHandle) insertTableHandle).getFilePrefix();\n+    }\n+\n+    protected Set<String> listAllDataFiles(ConnectorOutputTableHandle tableHandle)\n+            throws IOException\n+    {\n+        HiveOutputTableHandle hiveOutputTableHandle = (HiveOutputTableHandle) tableHandle;\n+        Path writePath = new Path(hiveOutputTableHandle.getWritePath().get());\n+        return listAllDataFiles(writePath, new HashSet<>());\n     }\n \n-    protected void doCreateEmptyTable(SchemaTableName tableName, HiveStorageFormat storageFormat)\n+    protected Set<String> listAllDataFiles(ConnectorInsertTableHandle tableHandle)\n+            throws IOException\n+    {\n+        HiveInsertTableHandle hiveInsertTableHandle = (HiveInsertTableHandle) tableHandle;\n+        Path writePath = new Path(hiveInsertTableHandle.getWritePath().get());\n+        return listAllDataFiles(writePath, new HashSet<>());\n+    }\n+\n+    protected Set<String> listAllDataFiles(String schemaName, String tableName)\n+            throws IOException\n+    {\n+        Table table = metastoreClient.getTable(schemaName, tableName).get();\n+        Path path = new Path(table.getSd().getLocation());\n+        Set<String> existingFiles = new HashSet<>();\n+        return listAllDataFiles(path, existingFiles);\n+    }\n+\n+    protected Set<String> listAllDataFiles(Path path, Set<String> existingFiles)\n+            throws IOException\n+    {\n+        FileSystem fileSystem = hdfsEnvironment.getFileSystem(path);\n+        if (fileSystem.exists(path)) {\n+            for (FileStatus fileStatus : fileSystem.listStatus(path)) {\n+                if (HadoopFileStatus.isFile(fileStatus)) {\n+                    existingFiles.add(fileStatus.getPath().toString());\n+                }\n+                else if (HadoopFileStatus.isDirectory(fileStatus)) {\n+                    existingFiles.addAll(listAllDataFiles(fileStatus.getPath(), existingFiles));\n+                }\n+            }\n+        }\n+        return existingFiles;\n+    }\n+\n+    private void doInsertPartitioned(HiveStorageFormat storageFormat, SchemaTableName tableName)\n             throws Exception\n     {\n-        // create the table\n-        Type arrayStringType = requireNonNull(TYPE_MANAGER.getType(parseTypeSignature(\"array<varchar>\")));\n-        List<ColumnMetadata> columns = ImmutableList.<ColumnMetadata>builder()\n-                .add(new ColumnMetadata(\"id\", BIGINT, false))\n-                .add(new ColumnMetadata(\"t_string\", VARCHAR, false))\n-                .add(new ColumnMetadata(\"t_bigint\", BIGINT, false))\n-                .add(new ColumnMetadata(\"t_double\", DOUBLE, false))\n-                .add(new ColumnMetadata(\"t_boolean\", BOOLEAN, false))\n-                .add(new ColumnMetadata(\"t_array_string\", arrayStringType, false))\n-                .build();\n+        // creating the table\n+        doCreateEmptyTable(tableName, storageFormat, CREATE_TABLE_COLUMNS_PARTITIONED);\n \n-        Map<String, Object> properties = ImmutableMap.of(STORAGE_FORMAT_PROPERTY, storageFormat);\n+        MaterializedResult.Builder resultBuilder = MaterializedResult.resultBuilder(SESSION, CREATE_TABLE_PARTITIONED_DATA.getTypes());\n+        for (int i = 0; i < 3; i++) {\n+            ConnectorTableHandle tableHandle = getTableHandle(tableName);\n \n-        ConnectorTableMetadata tableMetadata = new ConnectorTableMetadata(tableName, columns, properties, SESSION.getUser());\n+            // insert the data\n+            insertData(tableHandle, CREATE_TABLE_PARTITIONED_DATA, SESSION);\n \n-        metadata.createTable(SESSION, tableMetadata);\n+            // verify partitions were created\n+            List<String> partitionNames = getMetastoreClient(tableName.getSchemaName()).getPartitionNames(tableName.getSchemaName(), tableName.getTableName())\n+                    .orElseThrow(() -> new PrestoException(HIVE_METASTORE_ERROR, \"Partition metadata not available\"));\n+            assertEqualsIgnoreOrder(partitionNames, CREATE_TABLE_PARTITIONED_DATA.getMaterializedRows().stream()\n+                    .map(row -> \"ds=\" + row.getField(CREATE_TABLE_PARTITIONED_DATA.getTypes().size() - 1))\n+                    .collect(toList()));\n+\n+            // load the new table\n+            List<ColumnHandle> columnHandles = ImmutableList.copyOf(metadata.getColumnHandles(SESSION, tableHandle).values());\n+\n+            // verify the data\n+            resultBuilder.rows(CREATE_TABLE_PARTITIONED_DATA.getMaterializedRows());\n+            MaterializedResult result = readTable(tableHandle, columnHandles, SESSION, TupleDomain.all(), OptionalInt.empty(), Optional.of(storageFormat));\n+            assertEqualsIgnoreOrder(result.getMaterializedRows(), resultBuilder.build().getMaterializedRows());\n+\n+            assertEqualsIgnoreOrder(result.getMaterializedRows(), resultBuilder.build().getMaterializedRows());","path":"presto-hive/src/test/java/com/facebook/presto/hive/AbstractTestHiveClient.java","position":821,"original_position":821,"commit_id":"0725a43f478fdcd07b2b9803a9ac4909023780aa","original_commit_id":"0725a43f478fdcd07b2b9803a9ac4909023780aa","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},"body":"duplicate check","created_at":"2015-10-08T22:52:26Z","updated_at":"2015-10-08T22:52:26Z","html_url":"https://github.com/facebook/presto/pull/3377#discussion_r41579854","pull_request_url":"https://api.github.com/repos/facebook/presto/pulls/3377","_links":{"self":{"href":"https://api.github.com/repos/facebook/presto/pulls/comments/41579854"},"html":{"href":"https://github.com/facebook/presto/pull/3377#discussion_r41579854"},"pull_request":{"href":"https://api.github.com/repos/facebook/presto/pulls/3377"}}},"pull_request":{"url":"https://api.github.com/repos/facebook/presto/pulls/3377","id":41194636,"html_url":"https://github.com/facebook/presto/pull/3377","diff_url":"https://github.com/facebook/presto/pull/3377.diff","patch_url":"https://github.com/facebook/presto/pull/3377.patch","issue_url":"https://api.github.com/repos/facebook/presto/issues/3377","number":3377,"state":"open","locked":false,"title":"Implement INSERT for Hive with partition support","user":{"login":"dain","id":58298,"avatar_url":"https://avatars.githubusercontent.com/u/58298?v=3","gravatar_id":"","url":"https://api.github.com/users/dain","html_url":"https://github.com/dain","followers_url":"https://api.github.com/users/dain/followers","following_url":"https://api.github.com/users/dain/following{/other_user}","gists_url":"https://api.github.com/users/dain/gists{/gist_id}","starred_url":"https://api.github.com/users/dain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dain/subscriptions","organizations_url":"https://api.github.com/users/dain/orgs","repos_url":"https://api.github.com/users/dain/repos","events_url":"https://api.github.com/users/dain/events{/privacy}","received_events_url":"https://api.github.com/users/dain/received_events","type":"User","site_admin":false},"body":null,"created_at":"2015-07-30T03:16:32Z","updated_at":"2015-10-08T22:52:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a7fcc860ee179f01fd5cf4963cf05e3b6bcd3882","assignee":{"login":"electrum","id":9230,"avatar_url":"https://avatars.githubusercontent.com/u/9230?v=3","gravatar_id":"","url":"https://api.github.com/users/electrum","html_url":"https://github.com/electrum","followers_url":"https://api.github.com/users/electrum/followers","following_url":"https://api.github.com/users/electrum/following{/other_user}","gists_url":"https://api.github.com/users/electrum/gists{/gist_id}","starred_url":"https://api.github.com/users/electrum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/electrum/subscriptions","organizations_url":"https://api.github.com/users/electrum/orgs","repos_url":"https://api.github.com/users/electrum/repos","events_url":"https://api.github.com/users/electrum/events{/privacy}","received_events_url":"https://api.github.com/users/electrum/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/facebook/presto/pulls/3377/commits","review_comments_url":"https://api.github.com/repos/facebook/presto/pulls/3377/comments","review_comment_url":"https://api.github.com/repos/facebook/presto/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/presto/issues/3377/comments","statuses_url":"https://api.github.com/repos/facebook/presto/statuses/0725a43f478fdcd07b2b9803a9ac4909023780aa","head":{"label":"dain:hive-insert","ref":"hive-insert","sha":"0725a43f478fdcd07b2b9803a9ac4909023780aa","user":{"login":"dain","id":58298,"avatar_url":"https://avatars.githubusercontent.com/u/58298?v=3","gravatar_id":"","url":"https://api.github.com/users/dain","html_url":"https://github.com/dain","followers_url":"https://api.github.com/users/dain/followers","following_url":"https://api.github.com/users/dain/following{/other_user}","gists_url":"https://api.github.com/users/dain/gists{/gist_id}","starred_url":"https://api.github.com/users/dain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dain/subscriptions","organizations_url":"https://api.github.com/users/dain/orgs","repos_url":"https://api.github.com/users/dain/repos","events_url":"https://api.github.com/users/dain/events{/privacy}","received_events_url":"https://api.github.com/users/dain/received_events","type":"User","site_admin":false},"repo":{"id":5403482,"name":"presto","full_name":"dain/presto","owner":{"login":"dain","id":58298,"avatar_url":"https://avatars.githubusercontent.com/u/58298?v=3","gravatar_id":"","url":"https://api.github.com/users/dain","html_url":"https://github.com/dain","followers_url":"https://api.github.com/users/dain/followers","following_url":"https://api.github.com/users/dain/following{/other_user}","gists_url":"https://api.github.com/users/dain/gists{/gist_id}","starred_url":"https://api.github.com/users/dain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dain/subscriptions","organizations_url":"https://api.github.com/users/dain/orgs","repos_url":"https://api.github.com/users/dain/repos","events_url":"https://api.github.com/users/dain/events{/privacy}","received_events_url":"https://api.github.com/users/dain/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dain/presto","description":"Distributed SQL query engine for big data","fork":true,"url":"https://api.github.com/repos/dain/presto","forks_url":"https://api.github.com/repos/dain/presto/forks","keys_url":"https://api.github.com/repos/dain/presto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dain/presto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dain/presto/teams","hooks_url":"https://api.github.com/repos/dain/presto/hooks","issue_events_url":"https://api.github.com/repos/dain/presto/issues/events{/number}","events_url":"https://api.github.com/repos/dain/presto/events","assignees_url":"https://api.github.com/repos/dain/presto/assignees{/user}","branches_url":"https://api.github.com/repos/dain/presto/branches{/branch}","tags_url":"https://api.github.com/repos/dain/presto/tags","blobs_url":"https://api.github.com/repos/dain/presto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dain/presto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dain/presto/git/refs{/sha}","trees_url":"https://api.github.com/repos/dain/presto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dain/presto/statuses/{sha}","languages_url":"https://api.github.com/repos/dain/presto/languages","stargazers_url":"https://api.github.com/repos/dain/presto/stargazers","contributors_url":"https://api.github.com/repos/dain/presto/contributors","subscribers_url":"https://api.github.com/repos/dain/presto/subscribers","subscription_url":"https://api.github.com/repos/dain/presto/subscription","commits_url":"https://api.github.com/repos/dain/presto/commits{/sha}","git_commits_url":"https://api.github.com/repos/dain/presto/git/commits{/sha}","comments_url":"https://api.github.com/repos/dain/presto/comments{/number}","issue_comment_url":"https://api.github.com/repos/dain/presto/issues/comments{/number}","contents_url":"https://api.github.com/repos/dain/presto/contents/{+path}","compare_url":"https://api.github.com/repos/dain/presto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dain/presto/merges","archive_url":"https://api.github.com/repos/dain/presto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dain/presto/downloads","issues_url":"https://api.github.com/repos/dain/presto/issues{/number}","pulls_url":"https://api.github.com/repos/dain/presto/pulls{/number}","milestones_url":"https://api.github.com/repos/dain/presto/milestones{/number}","notifications_url":"https://api.github.com/repos/dain/presto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dain/presto/labels{/name}","releases_url":"https://api.github.com/repos/dain/presto/releases{/id}","created_at":"2012-08-13T19:14:12Z","updated_at":"2015-06-24T10:03:33Z","pushed_at":"2015-10-08T15:18:49Z","git_url":"git://github.com/dain/presto.git","ssh_url":"git@github.com:dain/presto.git","clone_url":"https://github.com/dain/presto.git","svn_url":"https://github.com/dain/presto","homepage":"http://prestodb.io/","size":49464,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":0,"forks":2,"open_issues":0,"watchers":3,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"17d42f72922b68a8125b15b35e1008bf219ade4f","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":5349565,"name":"presto","full_name":"facebook/presto","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/presto","description":"Distributed SQL query engine for running interactive analytic queries against big data sources.","fork":false,"url":"https://api.github.com/repos/facebook/presto","forks_url":"https://api.github.com/repos/facebook/presto/forks","keys_url":"https://api.github.com/repos/facebook/presto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/presto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/presto/teams","hooks_url":"https://api.github.com/repos/facebook/presto/hooks","issue_events_url":"https://api.github.com/repos/facebook/presto/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/presto/events","assignees_url":"https://api.github.com/repos/facebook/presto/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/presto/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/presto/tags","blobs_url":"https://api.github.com/repos/facebook/presto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/presto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/presto/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/presto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/presto/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/presto/languages","stargazers_url":"https://api.github.com/repos/facebook/presto/stargazers","contributors_url":"https://api.github.com/repos/facebook/presto/contributors","subscribers_url":"https://api.github.com/repos/facebook/presto/subscribers","subscription_url":"https://api.github.com/repos/facebook/presto/subscription","commits_url":"https://api.github.com/repos/facebook/presto/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/presto/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/presto/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/presto/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/presto/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/presto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/presto/merges","archive_url":"https://api.github.com/repos/facebook/presto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/presto/downloads","issues_url":"https://api.github.com/repos/facebook/presto/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/presto/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/presto/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/presto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/presto/labels{/name}","releases_url":"https://api.github.com/repos/facebook/presto/releases{/id}","created_at":"2012-08-09T01:03:37Z","updated_at":"2015-10-08T15:53:46Z","pushed_at":"2015-10-08T22:41:22Z","git_url":"git://github.com/facebook/presto.git","ssh_url":"git@github.com:facebook/presto.git","clone_url":"https://github.com/facebook/presto.git","svn_url":"https://github.com/facebook/presto","homepage":"https://prestodb.io","size":104456,"stargazers_count":3953,"watchers_count":3953,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1010,"mirror_url":null,"open_issues_count":339,"forks":1010,"open_issues":339,"watchers":3953,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/presto/pulls/3377"},"html":{"href":"https://github.com/facebook/presto/pull/3377"},"issue":{"href":"https://api.github.com/repos/facebook/presto/issues/3377"},"comments":{"href":"https://api.github.com/repos/facebook/presto/issues/3377/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/presto/pulls/3377/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/presto/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/presto/pulls/3377/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/presto/statuses/0725a43f478fdcd07b2b9803a9ac4909023780aa"}}}}