Skip to content

Commit d1c31cf

Browse files
author
MPCoreDeveloper
committed
Resolve data persistence & query compilation - ready for performance phase
- QueryCompiler: Fixed WHERE clause type handling (IComparable, numeric coercion) - Database: Confirmed InsertBatch() working (141/200 mystery SOLVED, 200/200 persisting) - Tests: All CompiledQueryTests passing, 1000 queries complete in 137-1466ms - Status: Stable checkpoint before performance optimization phase - Next: Focus on eliminating thread sleeps for flush operations"
1 parent 0fd99c2 commit d1c31cf

File tree

3 files changed

+423612
-2
lines changed

3 files changed

+423612
-2
lines changed

src/SharpCoreDB/Services/QueryCompiler.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,11 @@ private static Expression CompareUsingIComparable(Expression left, Expression ri
260260
left = Expression.Convert(left, typeof(IComparable));
261261
}
262262

263-
if (right.Type == typeof(object))
263+
// ✅ FIX: Always convert right to object for CompareTo parameter
264+
// CompareTo expects object, not specific types like int
265+
if (right.Type != typeof(object))
264266
{
265-
right = Expression.Convert(right, typeof(object)); // Keep as object for CompareTo parameter
267+
right = Expression.Convert(right, typeof(object));
266268
}
267269

268270
// Call: left.CompareTo(right)

0 commit comments

Comments
 (0)