← 输入框|github.com|刷新
Skip to content

Remove support for string INTERNing - #7888

Merged
mihaibudiu merged 2 commits into
mainfrom
issue7887
Nov 7, 2026
Merged

mihaibudiu merged 2 commits into
mainfrom
issue7887

Conversation

@mihaibudiu

Copy link
Copy Markdown
Contributor

Linked Issue

Fixes #7887

Two commits: one for sqllib, one for the compiler
This is essentially a delete-only PR

Comment thread crates/sqllib/src/lib.rs
Comment on lines 78 to 79

mod string_interner;
pub use string_interner::{build_string_interner, intern_string, unintern_string};

// Re-export these types, so they can be used in UDFs without having to import the dbsp crate directly.

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.

bug (medium): this leaves two blank lines in a row, so the cargo fmt hook in pre-commit fails here (and so would the pre-merge-queue check).

Suggested change
mod string_interner;
pub use string_interner::{build_string_interner, intern_string, unintern_string};
// Re-export these types, so they can be used in UDFs without having to import the dbsp crate directly.

@mythical-fred-oss

Copy link
Copy Markdown
Contributor

What I ran

Check Result
cargo check -p feldera-sqllib -p static-connectors ✅
cargo test -p feldera-sqllib ✅ 437 passed
./build.sh + mvn test on ParserTests, Regression1Tests, MultiCrateTests, PersistentIdTests, ShareIndexesTests, TestTagRegions ✅ 191 passed
pre-commit run --files <changed> ❌ cargo-fmt (see inline comment). All other hooks pass, including machete and the crypto check
git grep -i interned ✅ nothing left outside the changelog

Gates: the breaking change has a changelog entry and the docs are updated. Removing code also removes one unsafe transmute, which is a plus. No new dependencies.

missing (medium): no tests for the new behaviour. The PR deletes the INTERNED parser test but adds nothing to show the annotation is now rejected, or that interned is now an ordinary identifier. The earlier WATERMARK removal added exactly this pair of tests (watermarkIsNotAKeywordTest / watermarkAnnotationRejectedTest). I ran the tests below locally and they pass:

--- a/sql-to-dbsp-compiler/SQL-compiler/src/test/java/org/dbsp/sqlCompiler/compiler/sql/ParserTests.java
+++ b/sql-to-dbsp-compiler/SQL-compiler/src/test/java/org/dbsp/sqlCompiler/compiler/sql/ParserTests.java
@@ -364,6 +364,25 @@ public class ParserTests {
+    /** `INTERNED` was removed as a column annotation, so the word is an ordinary identifier. */
+    @Test
+    public void internedIsNotAKeywordTest() throws SqlParseException {
+        SqlToRelCompiler calcite = this.getCompiler();
+        SqlNode node = calcite.parse("CREATE TABLE interned(interned VARCHAR)");
+        Assert.assertTrue(node instanceof SqlCreateTable);
+    }
+
+    /** The removed `INTERNED` annotation no longer parses, on tables or recursive view columns. */
+    @Test
+    public void internedAnnotationRejectedTest() throws SqlParseException {
+        SqlToRelCompiler calcite = this.getCompiler();
+        Assert.assertThrows(SqlParseException.class,
+                () -> calcite.parse("CREATE TABLE st(name VARCHAR INTERNED)"));
+        Assert.assertNotNull(calcite.parse("DECLARE RECURSIVE VIEW v(name VARCHAR)"));
+        Assert.assertThrows(SqlParseException.class,
+                () -> calcite.parse("DECLARE RECURSIVE VIEW v(name VARCHAR INTERNED)"));
+    }

With the fmt fix and these tests added, this LGTM.

@mihaibudiu
mihaibudiu added this pull request to the merge queue Nov 7, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 7, 2026
- Remove INTERNED from the grammar.  INTERNED is not a reserved keyword now.
- Remove the passes that intern strings, and the interned string type,
  literal and operator.
- Remove the tests that need INTERNED.
- Remove INTERNED from the documentation and add a changelog entry.

Fixes #7887

Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
- Remove build_string_interner, intern_string, unintern_string, intern
  and unintern.
- Remove the reserved relation feldera_interned_strings from the
  catalog in static-connectors.
- Remove the dependencies blake3, quick_cache, typedmap and tempfile
  from sqllib.

Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
@mihaibudiu
mihaibudiu added this pull request to the merge queue Nov 7, 2026
Merged via the queue into main with commit efd5975 Nov 7, 2026
1 check passed
@mihaibudiu
mihaibudiu deleted the issue7887 branch November 7, 2026 10:04
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.

[SQL] Remove support for INTERNED strings

2 participants