aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
authordrh <>2023-10-19 18:07:58 +0000
committerdrh <>2023-10-19 18:07:58 +0000
commit4e254641ff2a5aefbce3398346dcb250aef7bbda (patch)
treee33fe416ffde9477b8da45bb30a71a4283373cdd /src/expr.c
parent058838579962fd4831ef2f4115da9c2d1e1972b1 (diff)
downloadsqlite-4e254641ff2a5aefbce3398346dcb250aef7bbda.tar.gz
sqlite-4e254641ff2a5aefbce3398346dcb250aef7bbda.zip
Simplify the Expr compression logic slightly by adding the new EP_FullSize
property to expressions that are exceptions to the rule and should not be compressed. FossilOrigin-Name: d5ae82ec52eafed5e3dc8c9d99685f6523fce7d973ef7e8d9d75ed9b8912426a
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/expr.c b/src/expr.c
index 38da1ab69..cc0b0dacc 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -591,6 +591,7 @@ Expr *sqlite3ExprForVectorField(
*/
pRet = sqlite3PExpr(pParse, TK_SELECT_COLUMN, 0, 0);
if( pRet ){
+ ExprSetProperty(pRet, EP_FullSize);
pRet->iTable = nField;
pRet->iColumn = iField;
pRet->pLeft = pVector;
@@ -1494,11 +1495,7 @@ static int dupedExprStructSize(const Expr *p, int flags){
assert( flags==EXPRDUP_REDUCE || flags==0 ); /* Only one flag value allowed */
assert( EXPR_FULLSIZE<=0xfff );
assert( (0xfff & (EP_Reduced|EP_TokenOnly))==0 );
- if( 0==flags || p->op==TK_SELECT_COLUMN
-#ifndef SQLITE_OMIT_WINDOWFUNC
- || ExprHasProperty(p, EP_WinFunc)
-#endif
- ){
+ if( 0==flags || ExprHasProperty(p, EP_FullSize) ){
nSize = EXPR_FULLSIZE;
}else{
assert( !ExprHasProperty(p, EP_TokenOnly|EP_Reduced) );