OmniSciDB  c07336695a
com.mapd.calcite.parser.MapDView Class Reference
+ Inheritance diagram for com.mapd.calcite.parser.MapDView:
+ Collaboration diagram for com.mapd.calcite.parser.MapDView:

Public Member Functions

 MapDView (String view_sql, TTableDetails ri, MapDParser mp)
 
String toString ()
 
SqlIdentifierCapturer getAccessedObjects ()
 
Schema.TableType getJdbcTableType ()
 
RelNode toRel (RelOptTable.ToRelContext context, RelOptTable relOptTable)
 
RelDataType getRowType (RelDataTypeFactory rdtf)
 
- Public Member Functions inherited from com.mapd.calcite.parser.MapDTable
long getVersion ()
 
 MapDTable (TTableDetails ri)
 
RelDataType getRowType (RelDataTypeFactory rdtf)
 
Statistic getStatistic ()
 
Schema.TableType getJdbcTableType ()
 
boolean isRolledUp (String string)
 
boolean rolledUpColumnValidInsideAgg (String string, SqlCall sc, SqlNode sn, CalciteConnectionConfig ccc)
 

Package Functions

String getViewSql ()
 

Static Package Attributes

static final Logger MAPDLOGGER = LoggerFactory.getLogger(MapDView.class)
 
- Static Package Attributes inherited from com.mapd.calcite.parser.MapDTable
static final Logger MAPDLOGGER = LoggerFactory.getLogger(MapDTable.class)
 

Private Attributes

final String viewSql
 
SqlIdentifierCapturer accessObjects
 
RelRoot viewRelRoot
 

Detailed Description

Definition at line 39 of file MapDView.java.

Constructor & Destructor Documentation

◆ MapDView()

com.mapd.calcite.parser.MapDView.MapDView ( String  view_sql,
TTableDetails  ri,
MapDParser  mp 
)
inline

Definition at line 45 of file MapDView.java.

References com.mapd.calcite.parser.MapDParser.captureIdentifiers(), com.mapd.calcite.parser.MapDParserOptions.isLegacySyntax(), and com.mapd.calcite.parser.MapDParser.queryToSqlNode().

45  {
46  super(ri);
47  this.viewSql = view_sql;
48  try {
49  MapDParserOptions parserOptions = new MapDParserOptions();
50  viewRelRoot = mp.queryToSqlNode(viewSql, parserOptions);
51  accessObjects = mp.captureIdentifiers(viewSql, parserOptions.isLegacySyntax());
52  } catch (SqlParseException e) {
53  MAPDLOGGER.error("error parsing view SQL: " + view_sql, e);
54  } catch (ValidationException ex) {
55  MAPDLOGGER.error("error validating view SQL: " + view_sql, ex);
56  } catch (RelConversionException ex) {
57  MAPDLOGGER.error("error doing Rel Conversion view SQL: " + view_sql, ex);
58  }
59  }
static final Logger MAPDLOGGER
Definition: MapDView.java:40
SqlIdentifierCapturer accessObjects
Definition: MapDView.java:42
+ Here is the call graph for this function:

Member Function Documentation

◆ getAccessedObjects()

SqlIdentifierCapturer com.mapd.calcite.parser.MapDView.getAccessedObjects ( )
inline

Definition at line 66 of file MapDView.java.

References com.mapd.calcite.parser.MapDView.accessObjects.

Referenced by com.mapd.calcite.parser.MapDParser.resolveSelectIdentifiers().

66  {
67  return accessObjects;
68  }
SqlIdentifierCapturer accessObjects
Definition: MapDView.java:42
+ Here is the caller graph for this function:

◆ getJdbcTableType()

Schema.TableType com.mapd.calcite.parser.MapDView.getJdbcTableType ( )
inline

Definition at line 75 of file MapDView.java.

75  {
76  return Schema.TableType.VIEW;
77  }

◆ getRowType()

RelDataType com.mapd.calcite.parser.MapDView.getRowType ( RelDataTypeFactory  rdtf)
inline

Definition at line 85 of file MapDView.java.

85  {
86  return viewRelRoot.validatedRowType;
87  }

◆ getViewSql()

String com.mapd.calcite.parser.MapDView.getViewSql ( )
inlinepackage

Definition at line 70 of file MapDView.java.

References com.mapd.calcite.parser.MapDView.viewSql.

70  {
71  return viewSql;
72  }

◆ toRel()

RelNode com.mapd.calcite.parser.MapDView.toRel ( RelOptTable.ToRelContext  context,
RelOptTable  relOptTable 
)
inline

Definition at line 80 of file MapDView.java.

80  {
81  return viewRelRoot.rel;
82  }

◆ toString()

String com.mapd.calcite.parser.MapDView.toString ( )
inline

Definition at line 61 of file MapDView.java.

References com.mapd.calcite.parser.MapDView.accessObjects.

61  {
62  return "View SQL: " + viewSql + "\n"
63  + "Accessed Objects\n" + accessObjects;
64  }
SqlIdentifierCapturer accessObjects
Definition: MapDView.java:42

Member Data Documentation

◆ accessObjects

SqlIdentifierCapturer com.mapd.calcite.parser.MapDView.accessObjects
private

◆ MAPDLOGGER

final Logger com.mapd.calcite.parser.MapDView.MAPDLOGGER = LoggerFactory.getLogger(MapDView.class)
staticpackage

Definition at line 40 of file MapDView.java.

◆ viewRelRoot

RelRoot com.mapd.calcite.parser.MapDView.viewRelRoot
private

Definition at line 43 of file MapDView.java.

◆ viewSql

final String com.mapd.calcite.parser.MapDView.viewSql
private

Definition at line 41 of file MapDView.java.

Referenced by com.mapd.calcite.parser.MapDView.getViewSql().


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