Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Improper parameterizing of variables without values #132

Merged
merged 3 commits into from
Nov 3, 2022

Conversation

oscar60310
Copy link
Contributor

@oscar60310 oscar60310 commented Nov 2, 2022

Description

  1. Ignore parameterization of undefined value.
    {{ context.params.somethingUndefined }} -- output nothing 
  2. Add void filter
    {% set someArr = [] %}
    {{ someArr.push(1) |  void }}
    
    select {{ someArr[0] }} as a;

Document
https://vulcan-sql-document-git-fix-avoid-pa-8e149a-vulcan-sql-document.vercel.app/docs/api-building/sql-syntax#void-filter

Issue ticket number

closes #112

Additional Context

@vercel
Copy link

vercel bot commented Nov 2, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
vulcan-sql-document ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 8:45AM (UTC)

@codecov-commenter
Copy link

Codecov Report

Base: 93.02% // Head: 93.04% // Increases project coverage by +0.02% 🎉

Coverage data is based on head (458016f) compared to base (120eec7).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #132      +/-   ##
===========================================
+ Coverage    93.02%   93.04%   +0.02%     
===========================================
  Files          275      277       +2     
  Lines         4157     4171      +14     
  Branches       548      549       +1     
===========================================
+ Hits          3867     3881      +14     
  Misses         192      192              
  Partials        98       98              
Flag Coverage Δ
build 95.18% <ø> (ø)
core 93.71% <100.00%> (+0.04%) ⬆️
extension-dbt 97.43% <ø> (ø)
extension-debug-tools 98.11% <ø> (ø)
extension-driver-duckdb 100.00% <ø> (ø)
extension-driver-pg 96.11% <ø> (ø)
extension-driver-snowflake 94.59% <ø> (ø)
integration-testing 96.15% <ø> (ø)
serve 90.03% <ø> (ø)
test-utility ∅ <ø> (∅)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/core/src/lib/data-query/parameterizer.ts 100.00% <100.00%> (ø)
...ine/built-in-extensions/query-builder/constants.ts 100.00% <100.00%> (ø)
...-engine/built-in-extensions/query-builder/index.ts 100.00% <100.00%> (ø)
...lt-in-extensions/query-builder/voidFIlterRunner.ts 100.00% <100.00%> (ø)
...t-in-extensions/query-builder/voidFilterBuilder.ts 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@kokokuo kokokuo left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@oscar60310 oscar60310 merged commit bce09d1 into develop Nov 3, 2022
@oscar60310 oscar60310 deleted the fix/avoid-parameterizing-of-null branch November 3, 2022 04:58
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.

Improper parameterizing of variables without values
3 participants