MCPcopy Create free account
hub / github.com/activeloopai/deeplake / printTableRefInfo

Function printTableRefInfo

cpp/3rd_party/sql-parser/src/util/sqlhelper.cpp:62–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62void printTableRefInfo(std::ostream& s, TableRef* table, uintmax_t numIndent)
63{
64 switch (table->type) {
65 case kTableName:
66 inprint(s, table->name, numIndent);
67 if (table->schema) {
68 inprint(s, "Schema", numIndent + 1);
69 inprint(s, table->schema, numIndent + 2);
70 }
71 break;
72 case kTableSelect:
73 printSelectStatementInfo(s, table->select, numIndent);
74 break;
75 case kTableJoin:
76 inprint(s, "Join Table", numIndent);
77 inprint(s, "Left", numIndent + 1);
78 printTableRefInfo(s, table->join->left, numIndent + 2);
79 inprint(s, "Right", numIndent + 1);
80 printTableRefInfo(s, table->join->right, numIndent + 2);
81 inprint(s, "Join Condition", numIndent + 1);
82 printExpression(s, table->join->condition, numIndent + 2);
83 break;
84 case kTableCrossProduct:
85 for (TableRef* tbl : *table->list) {
86 printTableRefInfo(s, tbl, numIndent);
87 }
88 break;
89 }
90
91 if (table->alias) {
92 printAlias(s, table->alias, numIndent);
93 }
94}
95
96void printAlias(std::ostream& s, Alias* alias, uintmax_t numIndent)
97{

Callers 1

printSelectStatementInfoFunction · 0.85

Calls 4

inprintFunction · 0.85
printSelectStatementInfoFunction · 0.85
printExpressionFunction · 0.85
printAliasFunction · 0.85

Tested by

no test coverage detected