Repository navigation
Remove support for string INTERNing - #7888
Conversation
|
|
||
| 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. |
There was a problem hiding this comment.
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).
| 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. |
|
What I ran
Gates: the breaking change has a changelog entry and the docs are updated. Removing code also removes one missing (medium): no tests for the new behaviour. The PR deletes the --- 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. |
- 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>
Linked Issue
Fixes #7887
Two commits: one for sqllib, one for the compiler
This is essentially a delete-only PR