Repository navigation
fix(core-spec): escape || so it renders in expression language tables - #575
Merged
jbonofre merged 1 commit intoOct 13, 2026
Merged
Conversation
In GitHub-Flavored Markdown an unescaped `|` acts as a table column delimiter even inside a code span, so the `||` concatenation operator in the String Manipulation and Common Dialect Variations tables spawned phantom columns instead of rendering. Escape the pipes as `\|\|`, matching the existing convention in converters/cube/README.md. The thoughtspot converter parses this spec file to assert its catalog covers every construct, and that parser was built around the unescaped `||`. Teach its _clean() helper to undo the `\|` escape so the extracted construct name stays `str1 || str2`; otherwise the escaped source leaks backslashes and test_catalog_covers_the_spec fails. Reported by @Haoranli503. Co-authored-by: Isaac <no-reply@databricks.com>
christianeu-db
marked this pull request as ready for review
October 12, 2026 20:38
jbonofre
self-requested a review
October 13, 2026 09:27
jbonofre
approved these changes
Oct 13, 2026
jbonofre
left a comment
Member
There was a problem hiding this comment.
LGTM.
Escaping || as \|\| in the two expression_language.md table rows keeps the tables rendering correctly, and unescaping \| in the Thoughspot catalog parser's _clean restores the literal ||. I checked that _split_table_row ignores pipes inside backtick spans, so the escaped cells stay in one cell. The Thoughtspot catalog and its spec-coverage test are the only code that reads this file.
Nit: _clean now unescapes \| in every cell, not just the || rows. That's harmless today, but a future cell that needs a literal backslash-pipe would be affected. You could limit the unescape to the operator cells, or just keep it in mind.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
||string concatenation operator did not render in two tables incore-spec/expression_language.md. In GitHub-Flavored Markdown, an unescaped|is a table column delimiter even inside a code span, so each||producedextra empty columns in its row instead of displaying the operator.
This change escapes the pipe characters as
\|\|, matching the existingconvention in
converters/cube/README.md. It covers both affected tables:||operator row.a || bcell.The ThoughtSpot converter parses this spec file to assert its catalog covers
every spec construct (
converters/thoughtspot/.../expressions/test_catalog_covers_the_spec.py),and that parser was built around the unescaped
||. This PR teaches its_clean()helper to undo the\|escape so the extracted construct name staysstr1 || str2. Without that one-line parser change, the escaped source leaksbackslashes and the coverage test fails.
This is not a breaking change. The specification's meaning is unchanged —
||was and remains a supported concatenation operator; only its rendering isfixed. The included parser update keeps the ThoughtSpot converter's test suite
green (
uv run pytest→ 1015 passed).Related Issues
Reported by @Haoranli503 in #547 (comment).
Checklist
Specification
core-spec/and follow the existing structureConverters
converters/is updated to reflect spec or ontology changesTests
pytest/ CI green)AI disclosure
Per the ASF Generative Tooling Guidance, this contribution was prepared with AI
assistance. I have reviewed and verified every change.