Skip to content

align expressions backend#9929

Open
wu-hui wants to merge 113 commits intomainfrom
align-expressions-backend
Open

align expressions backend#9929
wu-hui wants to merge 113 commits intomainfrom
align-expressions-backend

Conversation

@wu-hui
Copy link
Copy Markdown
Contributor

@wu-hui wu-hui commented May 6, 2026

No description provided.

MarkDuckworth and others added 30 commits October 14, 2024 08:25
MarkDuckworth and others added 15 commits November 5, 2025 15:44
Updated strictValueEquals to return 'EQ' for (null, null). Introduced 'TYPE_MISMATCH' in Equality type and handled it in array and map comparisons to return 'NOT_EQ'. Reverted null short-circuits in ordering comparisons to return FALSE for cross-type comparisons. Updated expectations in numerous tests to align with backend behavior. Fixed test bug in null_semantics.test.ts. Disabled failing spec test for pipelines.
@wu-hui wu-hui requested review from a team as code owners May 6, 2026 19:12
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 6, 2026

⚠️ No Changeset found

Latest commit: 3816c3f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new RealtimePipeline class and associated infrastructure to support complex data transformation and query pipelines in Firestore, including real-time capabilities. It adds necessary types, serialization logic, and integration tests. My review identified several concerns: a temporary circular dependency check bypass and commented-out property mangling in Rollup configuration that should be addressed, a potential issue with sort stage invalidation in the pipeline engine, a duplicate dependency in package.json, a typo in a documentation comment, and commented-out code in a test file that should be properly skipped or removed.

Comment on lines +99 to +100
// TODO reenable. This is a temp workaround to allow build
//throw new Error(warning);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Disabling the circular dependency check seems to be a temporary workaround. While understandable for a large refactoring, it's important to ensure this is re-enabled before merging to prevent introducing new circular dependencies.

Comment on lines +134 to +137
// renameInternals(service.getProgram(), {
// publicIdentifiers,
// prefix: '__PRIVATE_'
// })
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The renameInternals transformer is commented out. This will prevent mangling of private properties, potentially increasing bundle size and exposing internal APIs. Is this change intentional for this PR, or should it be reverted before merging?

Comment on lines +306 to +308
// return the last sort stage, throws exception if it doesn't exist
// TODO(pipeline): this implementation is wrong, there are stages that can invalidate
// the orderings later. The proper way to manipulate the pipeline so that last Sort
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The TODO here correctly identifies that this implementation is not robust. Simply finding the last Sort stage is insufficient, as subsequent stages like Aggregate or Distinct could invalidate the ordering. This might lead to incorrect results for some pipelines.

Comment thread package.json
"prettier": "2.8.8",
"protobufjs-cli": "^1.1.3",
"protractor": "5.4.2",
"protobufjs-cli": "^1.1.3",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This line introduces a duplicate protobufjs-cli dependency in devDependencies. Please remove one of the entries to keep the dependencies clean.

import { PipelineSource, Pipeline, RealtimePipeline } from '../dist/pipelines';

// Augment the Firestore and Query classes with the pipeline() method.
// Augument the Firestore and Query classes with the pipeline() method.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There's a typo here.

Suggested change
// Augument the Firestore and Query classes with the pipeline() method.
// Augment the Firestore and Query classes with the pipeline() method.

Comment on lines +31 to 47
// const accumulator = new EventsAccumulator<DocumentSnapshot>();
// const unsubscribe = onSnapshot(doc, accumulator.storeEvent);
//
// // Wait for watch to initialize and deliver first event.
// await accumulator.awaitRemoteEvent();
//
// // Use a transaction to perform a write without triggering any local events.
// await runTransaction(db, async txn => {
// txn.set(doc, { value: 'done' });
// });
//
// // Wait to see the write on the watch stream.
// const docSnap = await accumulator.awaitRemoteEvent();
// expect(docSnap.get('value')).to.equal('done');
//
// unsubscribe();
});
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The entire body of this test is commented out. If this test is being temporarily disabled, it would be better to use it.skip() to make the intent clear and prevent it from being forgotten. If it's no longer relevant, it should be removed.

@wu-hui wu-hui force-pushed the align-expressions-backend branch 8 times, most recently from ad7cf87 to b6178c0 Compare May 8, 2026 19:12
@wu-hui wu-hui force-pushed the align-expressions-backend branch from b6178c0 to 3816c3f Compare May 8, 2026 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants