v1-0001-Remove-obsolete-check-for-TTSOpsVirtual-from-slot.patch

text/x-patch

Filename: v1-0001-Remove-obsolete-check-for-TTSOpsVirtual-from-slot.patch
Type: text/x-patch
Part: 0
Message: Remove obsolete check for TTSOpsVirtual from slot_compile_deform

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: format-patch
Series: patch v1-0001
Subject: Remove obsolete check for TTSOpsVirtual from slot_compile_deform.
File+
src/backend/jit/llvm/llvmjit_deform.c 2 3
From 6db602bd7d0964b60134c4b20b4107a1e8717b78 Mon Sep 17 00:00:00 2001
From: Xing Guo <higuoxing@gmail.com>
Date: Mon, 30 Oct 2023 22:34:10 +0800
Subject: [PATCH v1] Remove obsolete check for TTSOpsVirtual from
 slot_compile_deform.

Since virtual tuples never need deforming and there's no
EEOP_*_FETCHSOME step generated for it. We don't need to check it in
slot_compile_deform. Probably we should replace it with an assertion.
---
 src/backend/jit/llvm/llvmjit_deform.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/backend/jit/llvm/llvmjit_deform.c b/src/backend/jit/llvm/llvmjit_deform.c
index b7e88e7ca9..e652cda77f 100644
--- a/src/backend/jit/llvm/llvmjit_deform.c
+++ b/src/backend/jit/llvm/llvmjit_deform.c
@@ -90,9 +90,8 @@ slot_compile_deform(LLVMJitContext *context, TupleDesc desc,
 
 	int			attnum;
 
-	/* virtual tuples never need deforming, so don't generate code */
-	if (ops == &TTSOpsVirtual)
-		return NULL;
+	/* virtual tuples never need deforming */
+	Assert(ops != &TTSOpsVirtual);
 
 	/* decline to JIT for slot types we don't know to handle */
 	if (ops != &TTSOpsHeapTuple && ops != &TTSOpsBufferHeapTuple &&
-- 
2.42.0