OmniSciDB  04ee39c94c
MapDRenderHandler.h
Go to the documentation of this file.
1 /*
2  * Copyright 2017 MapD Technologies, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 /*
18  * File: MapDRenderHandler.h
19  * Author: Chris Root
20  *
21  * Created on Nov 6, 2017, 10:00 AM
22  */
23 
24 #ifndef MAPDRENDERHANDLER_H_
25 #define MAPDRENDERHANDLER_H_
26 
27 #include "../MapDHandler.h"
28 #include "Shared/MapDParameters.h"
29 
31  public:
33 
34  private:
36  const size_t render_mem_bytes,
37  const int num_gpus,
38  const int start_gpu,
39  const MapDParameters mapd_parameters) {
40  throw std::runtime_error(
41  "Rendering is only supported in the Enterprise and Community Editions");
42  }
43 
44  void disconnect(const TSessionId& session) {}
45 
46  void render_vega(TRenderResult& _return,
47  const std::shared_ptr<Catalog_Namespace::SessionInfo> session_info,
48  const int64_t widget_id,
49  const std::string& vega_json,
50  const int32_t compression_level,
51  const std::string& nonce) {
52  CHECK(false);
53  }
54 
55  void start_render_query(TPendingRenderQuery& _return,
56  const TSessionId& session,
57  const int64_t widget_id,
58  const int16_t node_idx,
59  const std::string& vega_json) {
60  CHECK(false);
61  }
62 
63  void execute_next_render_step(TRenderStepResult& _return,
64  const TPendingRenderQuery& pending_render,
65  const TRenderAggDataMap& merged_data) {
66  CHECK(false);
67  }
68 
69  static std::string dump_table_col_names(
70  const std::map<std::string, std::vector<std::string>>& table_col_names) {
71  CHECK(false);
72  }
73 
75  TPixelTableRowResult& _return,
76  const std::shared_ptr<Catalog_Namespace::SessionInfo> session_info,
77  const int64_t widget_id,
78  const TPixel& pixel,
79  const std::map<std::string, std::vector<std::string>>& table_col_names,
80  const bool column_format,
81  const int32_t pixelRadius,
82  const std::string& nonce) {
83  CHECK(false);
84  }
85 
86  void clear_gpu_memory() { CHECK(false); }
87  void clear_cpu_memory() { CHECK(false); }
88 
89  ::QueryRenderer::QueryRenderManager* get_render_manager() {
90  CHECK(false);
91  return nullptr;
92  }
93 
94  void handle_ddl(Parser::DDLStmt*) { CHECK(false); }
95  void shutdown() { CHECK(false); }
96 
97  friend class MapDHandler;
98 };
99 
100 #endif /* MAPDRENDERHANDLER_H_ */
void get_result_row_for_pixel(TPixelTableRowResult &_return, const std::shared_ptr< Catalog_Namespace::SessionInfo > session_info, const int64_t widget_id, const TPixel &pixel, const std::map< std::string, std::vector< std::string >> &table_col_names, const bool column_format, const int32_t pixelRadius, const std::string &nonce)
void render_vega(TRenderResult &_return, const std::shared_ptr< Catalog_Namespace::SessionInfo > session_info, const int64_t widget_id, const std::string &vega_json, const int32_t compression_level, const std::string &nonce)
void disconnect(const TSessionId &session)
MapDRenderHandler(MapDHandler *mapd_handler, const size_t render_mem_bytes, const int num_gpus, const int start_gpu, const MapDParameters mapd_parameters)
void execute_next_render_step(TRenderStepResult &_return, const TPendingRenderQuery &pending_render, const TRenderAggDataMap &merged_data)
::QueryRenderer::QueryRenderManager * get_render_manager()
void handle_ddl(Parser::DDLStmt *)
static std::string dump_table_col_names(const std::map< std::string, std::vector< std::string >> &table_col_names)
void start_render_query(TPendingRenderQuery &_return, const TSessionId &session, const int64_t widget_id, const int16_t node_idx, const std::string &vega_json)
#define CHECK(condition)
Definition: Logger.h:187
TSessionId session