GEN_expr @brief Generate blr for an arbitrary expression. @param dsqlScratch @param node **/
| 102 | |
| 103 | **/ |
| 104 | void GEN_expr(DsqlCompilerScratch* dsqlScratch, ExprNode* node) |
| 105 | { |
| 106 | RseNode* rseNode = nodeAs<RseNode>(node); |
| 107 | if (rseNode) |
| 108 | { |
| 109 | GEN_rse(dsqlScratch, rseNode); |
| 110 | return; |
| 111 | } |
| 112 | |
| 113 | node->genBlr(dsqlScratch); |
| 114 | |
| 115 | // Check whether the node we just processed is for a dialect 3 |
| 116 | // operation which gives a different result than the corresponding |
| 117 | // operation in dialect 1. If it is, and if the client dialect is 2, |
| 118 | // issue a warning about the difference. |
| 119 | |
| 120 | // ASF: Shouldn't we check nod_gen_id2 too? |
| 121 | |
| 122 | const char* compatDialectVerb; |
| 123 | |
| 124 | if (node->getKind() == DmlNode::KIND_VALUE && dsqlScratch->clientDialect == SQL_DIALECT_V6_TRANSITION && |
| 125 | (compatDialectVerb = node->getCompatDialectVerb())) |
| 126 | { |
| 127 | dsc desc; |
| 128 | DsqlDescMaker::fromNode(dsqlScratch, &desc, static_cast<ValueExprNode*>(node)); |
| 129 | |
| 130 | if (desc.dsc_dtype == dtype_int64) |
| 131 | { |
| 132 | ERRD_post_warning( |
| 133 | Arg::Warning(isc_dsql_dialect_warning_expr) << |
| 134 | Arg::Str(compatDialectVerb)); |
| 135 | } |
| 136 | } |
| 137 | } |
| 138 | |
| 139 | /** |
| 140 |
no test coverage detected