-
-
Notifications
You must be signed in to change notification settings - Fork 234
Refactor col defaults #1932
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
Closed
Closed
Refactor col defaults #1932
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
67ae334
Use EvaluateCondition to ensure booleans are converted
adjeiv e6ba8f3
Move over existing JSONContainsPath code to new file
macneale4 37efd0f
Switch lateral join condition to use IsTrue
adjeiv 7e15032
Implmentation of json_contains_path(json_doc, one_or_all, path[, path…
macneale4 310846e
[ga-format-pr] Run ./format_repo.sh to fix formatting
macneale4 505d461
Merge pull request #1926 from adjeiv/join_integer_filter
nicktobey 3558080
Add engine tests
macneale4 30886d5
Refactor parse column defaults for Dolt storage
max-hoffman d85158a
fix columns table
max-hoffman 7d6e9b8
Add single test for Error path in enginetest. Other errors covered in…
macneale4 356d327
Merge pull request #1929 from dolthub/macneale4/json_contains_path
macneale4 7a82cb1
Fixed case sensitivity bugs in various statements
zachmu d336303
[ga-format-pr] Run ./format_repo.sh to fix formatting
zachmu a2a868e
Merge pull request #1933 from dolthub/zachmu/case-sensitivity-bug
zachmu 40290e5
fix dolt tests
max-hoffman 7741863
Merge branch 'main' into max/refactor-col-defaults
max-hoffman ea874ec
merge main
max-hoffman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,6 +71,7 @@ func TestScriptWithEngine(t *testing.T, e *sqle.Engine, harness Harness, script | |
} | ||
} | ||
ctx := NewContext(harness).WithQuery(statement) | ||
//ctx = NewContext(harness).WithQuery(statement) | ||
RunQueryWithContext(t, e, harness, ctx, statement) | ||
} | ||
|
||
|
@@ -362,14 +363,15 @@ func injectBindVarsAndPrepare( | |
) (string, map[string]*querypb.BindVariable, error) { | ||
parsed, err := sqlparser.Parse(q) | ||
if err != nil { | ||
return q, nil, err | ||
return q, nil, sql.ErrSyntaxError.New(err) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this wrapping necessary here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Some error tests expected this |
||
} | ||
|
||
resPlan, err := planbuilder.Parse(ctx, e.Analyzer.Catalog, q) | ||
if err != nil { | ||
return q, nil, err | ||
} | ||
|
||
b := planbuilder.New(ctx, sql.MapCatalog{}) | ||
_, isInsert := resPlan.(*plan.InsertInto) | ||
bindVars := make(map[string]*querypb.BindVariable) | ||
var bindCnt int | ||
|
@@ -382,7 +384,6 @@ func injectBindVarsAndPrepare( | |
case sqlparser.HexNum, sqlparser.HexVal: | ||
return false, nil | ||
} | ||
b := planbuilder.New(ctx, sql.MapCatalog{}) | ||
e := b.ConvertVal(n) | ||
val, _, err := e.Type().Promote().Convert(e.(*expression.Literal).Value()) | ||
if err != nil { | ||
|
@@ -414,6 +415,8 @@ func injectBindVarsAndPrepare( | |
|
||
buf := sqlparser.NewTrackedBuffer(nil) | ||
parsed.Format(buf) | ||
println(q) | ||
max-hoffman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
println(buf.String()) | ||
e.PreparedDataCache.CacheStmt(ctx.Session.ID(), buf.String(), parsed) | ||
|
||
_, isDatabaser := resPlan.(sql.Databaser) | ||
|
@@ -512,6 +515,9 @@ func checkResults( | |
for i, row := range widenedExpected { | ||
for j, field := range row { | ||
if cvv, isCustom := field.(CustomValueValidator); isCustom { | ||
if i >= len(widenedRows) { | ||
continue | ||
} | ||
actual := widenedRows[i][j] // shouldn't panic, but fine if it does | ||
ok, err := cvv.Validate(actual) | ||
if err != nil { | ||
|
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
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to return an err from here directly rather than letting happen by code outside the block
Same comment on the lines below