OmniSciDB  baf940c279
com.mapd.parser.server.CalciteParserFactory Class Reference
+ Inheritance diagram for com.mapd.parser.server.CalciteParserFactory:
+ Collaboration diagram for com.mapd.parser.server.CalciteParserFactory:

Public Member Functions

 CalciteParserFactory (String dataDir, final Map< String, ExtensionFunction > extSigs, int mapdPort, SockTransportProperties skT)
 
void updateOperatorTable ()
 
Object makeObject () throws Exception
 
void destroyObject (Object obj) throws Exception
 
boolean validateObject (Object obj)
 
void activateObject (Object obj) throws Exception
 
void passivateObject (Object obj) throws Exception
 

Static Package Functions

 [static initializer]
 

Static Package Attributes

static final Logger MAPDLOGGER = LoggerFactory.getLogger(CalciteParserFactory.class)
 

Private Attributes

final String dataDir
 
final Map< String, ExtensionFunctionextSigs
 
final int mapdPort
 
final SockTransportProperties socket_transport_properties
 
volatile MapDSqlOperatorTable tableOperator
 
final Supplier< MapDSqlOperatorTabletableOperatorSupplier
 

Detailed Description

Author
michael

Definition at line 35 of file CalciteParserFactory.java.

Constructor & Destructor Documentation

◆ CalciteParserFactory()

com.mapd.parser.server.CalciteParserFactory.CalciteParserFactory ( String  dataDir,
final Map< String, ExtensionFunction extSigs,
int  mapdPort,
SockTransportProperties  skT 
)
inline

Definition at line 60 of file CalciteParserFactory.java.

References com.mapd.parser.server.CalciteParserFactory.dataDir, com.mapd.parser.server.CalciteParserFactory.extSigs, com.mapd.parser.server.CalciteParserFactory.mapdPort, and com.mapd.parser.server.CalciteParserFactory.updateOperatorTable().

+ Here is the call graph for this function:

Member Function Documentation

◆ [static initializer]()

com.mapd.parser.server.CalciteParserFactory.[static initializer] ( )
inlinestaticpackage

◆ activateObject()

void com.mapd.parser.server.CalciteParserFactory.activateObject ( Object  obj) throws Exception
inline

Definition at line 103 of file CalciteParserFactory.java.

103  {
104  // don't need to do anything
105  }

◆ destroyObject()

void com.mapd.parser.server.CalciteParserFactory.destroyObject ( Object  obj) throws Exception
inline

Definition at line 87 of file CalciteParserFactory.java.

87  {
88  // no need to do anything
89  }

◆ makeObject()

Object com.mapd.parser.server.CalciteParserFactory.makeObject ( ) throws Exception
inline

Definition at line 80 of file CalciteParserFactory.java.

80  {
81  MapDParser obj = new MapDParser(
83  return obj;
84  }
final Supplier< MapDSqlOperatorTable > tableOperatorSupplier
final SockTransportProperties socket_transport_properties

◆ passivateObject()

void com.mapd.parser.server.CalciteParserFactory.passivateObject ( Object  obj) throws Exception
inline

Definition at line 108 of file CalciteParserFactory.java.

108  {
109  // nothing to currently do here
110  }

◆ updateOperatorTable()

void com.mapd.parser.server.CalciteParserFactory.updateOperatorTable ( )
inline

Definition at line 72 of file CalciteParserFactory.java.

References com.mapd.calcite.parser.MapDSqlOperatorTable.addUDF(), and com.mapd.parser.server.CalciteParserFactory.tableOperator.

Referenced by com.mapd.parser.server.CalciteParserFactory.CalciteParserFactory(), and com.mapd.parser.server.CalciteServerHandler.setRuntimeExtensionFunctions().

72  {
73  MapDSqlOperatorTable tableOperator =
74  new MapDSqlOperatorTable(SqlStdOperatorTable.instance());
75  MapDSqlOperatorTable.addUDF(tableOperator, extSigs);
76  this.tableOperator = tableOperator;
77  }
static void addUDF(MapDSqlOperatorTable opTab, final Map< String, ExtensionFunction > extSigs)
final Map< String, ExtensionFunction > extSigs
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ validateObject()

boolean com.mapd.parser.server.CalciteParserFactory.validateObject ( Object  obj)
inline

Definition at line 92 of file CalciteParserFactory.java.

References com.mapd.calcite.parser.MapDParser.getCallCount().

92  {
93  MapDParser mdp = (MapDParser) obj;
94  if (mdp.getCallCount() < 1000) {
95  return true;
96  } else {
97  MAPDLOGGER.debug(" invalidating object due to max use count");
98  return false;
99  }
100  }
+ Here is the call graph for this function:

Member Data Documentation

◆ dataDir

final String com.mapd.parser.server.CalciteParserFactory.dataDir
private

◆ extSigs

final Map<String, ExtensionFunction> com.mapd.parser.server.CalciteParserFactory.extSigs
private

◆ MAPDLOGGER

final Logger com.mapd.parser.server.CalciteParserFactory.MAPDLOGGER = LoggerFactory.getLogger(CalciteParserFactory.class)
staticpackage

Definition at line 36 of file CalciteParserFactory.java.

◆ mapdPort

final int com.mapd.parser.server.CalciteParserFactory.mapdPort
private

◆ socket_transport_properties

final SockTransportProperties com.mapd.parser.server.CalciteParserFactory.socket_transport_properties
private

Definition at line 41 of file CalciteParserFactory.java.

◆ tableOperator

volatile MapDSqlOperatorTable com.mapd.parser.server.CalciteParserFactory.tableOperator
private

◆ tableOperatorSupplier

final Supplier<MapDSqlOperatorTable> com.mapd.parser.server.CalciteParserFactory.tableOperatorSupplier
private
Initial value:
=
new Supplier<MapDSqlOperatorTable>() {
@Override
public MapDSqlOperatorTable get() {
return tableOperator;
}
}

Definition at line 43 of file CalciteParserFactory.java.


The documentation for this class was generated from the following file: