[Tarantool-patches] [PATCH v2 1/2] sql: rename TK_COLUMN to TK_COLUMN_NAME

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Sat Apr 25 01:55:52 MSK 2020


Hi! Thanks for the patch!

> @@ -5081,7 +5081,7 @@ sqlExprCompare(Expr * pA, Expr * pB, int iTab)
>  		}
>  		return 2;
>  	}
> -	if (pA->op != TK_COLUMN && pA->op != TK_AGG_COLUMN && pA->u.zToken) {
> +	if (pA->op != TK_COLUMN_NAME && pA->op != TK_AGG_COLUMN && pA->u.zToken) {

1. This is out of 80 symbols. Please, wrap the line.

>  		if (pA->op == TK_FUNCTION) {
>  			if (sqlStrICmp(pA->u.zToken, pB->u.zToken) != 0)
>  				return 2;
> @@ -5161,7 +5161,7 @@ sqlExprListCompare(ExprList * pA, ExprList * pB, int iTab)
>   *     pE1: x IS NULL  pE2: x IS NOT NULL    Result: false
>   *     pE1: x IS ?2    pE2: x IS NOT NULL    Reuslt: false
>   *
> - * When comparing TK_COLUMN nodes between pE1 and pE2, if pE2 has
> + * When comparing TK_COLUMN_NAME nodes between pE1 and pE2, if pE2 has
>   * Expr.iTable<0 then assume a table number given by iTab.
>   *
>   * When in doubt, return false.  Returning true might give a performance
> @@ -5209,11 +5209,11 @@ exprSrcCount(Walker * pWalker, Expr * pExpr)
>  {
>  	/* The NEVER() on the second term is because sqlFunctionUsesThisSrc()
>  	 * is always called before sqlExprAnalyzeAggregates() and so the
> -	 * TK_COLUMNs have not yet been converted into TK_AGG_COLUMN.  If
> +	 * TK_COLUMN_NAMEs have not yet been converted into TK_AGG_COLUMN.  If

2. While you are here, please, remove the multiplied whitespace.

>  	 * sqlFunctionUsesThisSrc() is used differently in the future, the
>  	 * NEVER() will need to be removed.
>  	 */
> -	if (pExpr->op == TK_COLUMN || NEVER(pExpr->op == TK_AGG_COLUMN)) {
> +	if (pExpr->op == TK_COLUMN_NAME || NEVER(pExpr->op == TK_AGG_COLUMN)) {
>  		int i;
>  		struct SrcCount *p = pWalker->u.pSrcCount;
>  		SrcList *pSrc = p->pSrc;


More information about the Tarantool-patches mailing list