-
Notifications
You must be signed in to change notification settings - Fork 114
SQL Server tsql base abstract class introduction #2317
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
base: main
Are you sure you want to change the base?
SQL Server tsql base abstract class introduction #2317
Conversation
| /* | ||
| * Copyright 2023 Google LLC | ||
| * | ||
| * Permission is hereby granted, free of charge, to any person obtaining | ||
| * a copy of this software and associated documentation files | ||
| * (the "Software"), to deal in the Software without restriction, | ||
| * including without limitation the rights to use, copy, modify, merge, | ||
| * publish, distribute, sublicense, and/or sell copies of the Software, | ||
| * and to permit persons to whom the Software is furnished to do so, | ||
| * subject to the following conditions: | ||
| * | ||
| * The above copyright notice and this permission notice shall be | ||
| * included in all copies or substantial portions of the Software. | ||
| * | ||
| * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
| * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
| * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
| * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | ||
| * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||
| * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
| * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| */ |
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.
We are having an internal discussion about the copyright block. I HOPE our policy about this is about to be
- Documented
- A much smaller wall of text.
TODO Check in again with me before this merges.
| // Added field supportsLimit. TSQL Doesn't support limit and limit is not part of the SQL Standard | ||
| // TODO (vitor): Discuss with malloy | ||
| supportsLimit = true; |
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.
Something like
export type LimitingClause = 'limit' | 'top';
limitClause: LimitClause = 'limit';?
|
|
||
| // Added field supportsRegexp. TSQL Doesn't support regexp. Idk how to use this with = false yet (tsql case). Malloy seems to often go for regexp | ||
| // TODO (vitor): Discuss with malloy | ||
| supportsRegexp = true; |
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.
There are regular expressions in Malloy expressions, but no databases "support" regular expressions as a data type. A regular expression is just a string which has special quoting rules and which therefore acts differently with the ~ operator. I don't think you need to mark them "not supported". If you can implement sqlRegexpMatch, which I think you can, then that is all the "support" needed.
| // TODO (vitor): Discuss with malloy | ||
| supportsRegexp = true; | ||
|
|
||
| // TSQL doesn't let you do complex operations on GROUP BY for aliased columns. |
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.
I think you get to name it. If a second dialect comes along and you picked a wrong name, we'll just change it then.
|
|
||
| import type {MalloyStandardFunctionImplementations as OverrideMap} from '../functions/malloy_standard_functions'; | ||
|
|
||
| // TODO (vitor): I don't know why NULLs are greatest and least but I've seen this in postgres and duckdb. Gotta figure it out. |
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.
I think this is a place where @christopherswenson should comment since he is the architect of the standard function library
| // SQL Server does have ESCAPE but Synapse doesn't | ||
| likeEscape = false; |
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.
In Malloy source, writing a filter expression or a string match
endsInPercent is strVal ~ '%\\%'
endInPersent is strVal ~ f'%\%'
when the LIKE expression is written, it is assumed that EITHER backslash is the correct escape character or that the dialect as the ESCAPE syntax for the LIKE statement. So really, to make this abundantly clear, this should probably have followed the pattern ...
export type LikeEscapeStyle = 'escape' | 'backslash';
likeEscape: LikeEscapeStyle = 'backslash';| likeEscape = false; | ||
|
|
||
| // TODO (vitor): idk about this cantPartitionWindowFunctionsOnExpressions... | ||
| // There's a problem with non top level CTE's with sqlserver |
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.
This is another place where I'd like @christopherswenson to weigh in
| if (c === null) { | ||
| return 'true'; | ||
| // TODO (vitor): not sure if this is the best place to put it but we need something like this for tsql. | ||
| return d.booleanAsNumbers ? '(1 = 1)' : 'true'; |
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.
Yeah this seems fine
| return `${expr.e.sql} IS NOT NULL`; | ||
| case 'true': | ||
| // TODO (vitor): check with the malloy team | ||
| return this.parent.dialect.booleanAsNumbers ? '1=1' : expr.node; |
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.
so in other "booleanAsNumber" dialects, there are symbols "true" and "false" which evaluate to "1" and "0".
if that isn't the case for tsql then probably there should be a dialect function which returns the true and false values
case 'true':
return this.parent.dialect.booleanValue(true);
case 'false':
return this.parent.dialect.booleanValue(false);And everything except tsql uses
booleanValue(v: boolean) { return v ? 'true' : 'false' }
test/src/util/index.ts
Outdated
| } | ||
| } | ||
|
|
||
| // TODO (vitor): Not sure... This is pretty hidden away and uses dbName instead of dialect for param |
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.
this should go away and be replaced by the dialect function i mentioned
| */ | ||
| sqlBoolean(bv: boolean): string { | ||
| if (this.booleanType === 'none') { | ||
| return bv ? '(1=1)' : '(1-0)'; |
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.
Was 1-0 instead of 1=0 intentional?
| } | ||
|
|
||
| genereateSQLOrderBy( | ||
| generateSQLOrderBy( |
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.
fixing a typo
051f1d9 to
68f2b2f
Compare
Signed-off-by: vitorelourenco <vitor@lourencos.net> remove files Signed-off-by: vitorelourenco <vitor@lourencos.net> remove files Signed-off-by: vitorelourenco <vitor@lourencos.net> Sync main version Try string agg distinct for tsql Undo Try generate group by function Override length Fix sqlOrderBy Try fix order by Add limitStyle Signed-off-by: vitorelourenco <vitor@lourencos.net> Signed-off-by: vitorelourenco <vitor@lourencos.net> Fix env var Try fix tsql dialect Try string repeat Remove bad test conditional Fix typo Add div and starts_with functions Revert removing dimensionindex Remove parenthesis increase timeout Signed-off-by: vitorelourenco <vitor@lourencos.net> Signed-off-by: vitorelourenco <vitor@lourencos.net> Add comment fix version Signed-off-by: vitorelourenco <vitor@lourencos.net> Signed-off-by: vitorelourenco <vitor@lourencos.net> Add comment Update malloy package Remove booleanValue function Remove unused attr Remove unused attr Add todos Reorder args Add super call Fix true false improve patindex regexp Improve regexp Improve sql regexp Improve regexpmatch Disable sqlserver DCO Remediation Commit for vitorelourenco <vitor.registros@lourencos.net> I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: edec88e I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 0283011 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: d3c45fe I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 2e3db33 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 4f81393 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: ab64860 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 1171b70 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: b5d4483 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 5cfbaab I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: b399412 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 877188f I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 47436f0 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 1fb09da I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: df75fe6 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: c62b396 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 3a5ed06 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: fc94a82 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: bedd725 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 5d84f81 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 0350a2e I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: e6151ad I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: b2ce548 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 21e1b8b I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 74594c0 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 01e2eeb I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: cec8d3f I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 36198b2 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 6a9d0a5 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 47aca4f I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 2a9a7cc I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 2cae38f I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 4f1f271 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: d99576d I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 4fe82ba I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 2cd7733 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 957e352 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 0691a6b I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 5f3663c I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 668399a I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 80a14da I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 44026a0 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 4acf073 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 7669437 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 0cecf21 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 45c7ed0 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 73125c1 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: b5c574f I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: fdc292a I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: d352296 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 63fe410 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: f621ee2 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 489550a I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 2244ef4 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 5bd3e70 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 9b8ebec I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 566cd2a I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 78a8261 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: a246c28 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 86b0073 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 34c5694 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 187045c I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 0082de8 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: fd3abbe I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 26b38ce I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 0f8b877 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 3fb7a98 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: c211c66 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: eaeb6ad I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 8268f6e I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: febfbae I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 58b1a60 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: ccf3d7e I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: a3db71b I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 458abcb I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 1e4f268 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: b36453d I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 6412ccd I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 90d4bc5 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 7dffaf0 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 3a7d869 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: d8bd676 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: a8ae385 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: ff11f2d I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: c58ac9e I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 176b952 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 8501c3b I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: c8eeea0 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 6651ec4 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: f94c078 Signed-off-by: vitorelourenco <vitor.registros@lourencos.net> Fix segment bug Style DCO Remediation Commit for vitorelourenco <vitor.registros@lourencos.net> I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 9297d5a I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 34a9840 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 5721943 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: a1afb6c I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 16c3c13 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 92c1a26 Signed-off-by: vitorelourenco <vitor.registros@lourencos.net> Signed-off-by: vitorelourenco <vitor@lourencos.net> Add comment Update malloy package Remove booleanValue function Remove unused attr Remove unused attr Add todos Reorder args Add super call Fix true false improve patindex regexp Improve regexp Improve sql regexp Improve regexpmatch Disable sqlserver DCO Remediation Commit for vitorelourenco <vitor.registros@lourencos.net> I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: edec88e I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 0283011 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: d3c45fe I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 2e3db33 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 4f81393 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: ab64860 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 1171b70 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: b5d4483 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 5cfbaab I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: b399412 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 877188f I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 47436f0 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 1fb09da I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: df75fe6 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: c62b396 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 3a5ed06 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: fc94a82 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: bedd725 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 5d84f81 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 0350a2e I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: e6151ad I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: b2ce548 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 21e1b8b I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 74594c0 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 01e2eeb I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: cec8d3f I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 36198b2 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 6a9d0a5 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 47aca4f I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 2a9a7cc I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 2cae38f I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 4f1f271 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: d99576d I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 4fe82ba I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 2cd7733 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 957e352 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 0691a6b I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 5f3663c I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 668399a I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 80a14da I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 44026a0 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 4acf073 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 7669437 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 0cecf21 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 45c7ed0 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 73125c1 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: b5c574f I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: fdc292a I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: d352296 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 63fe410 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: f621ee2 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 489550a I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 2244ef4 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 5bd3e70 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 9b8ebec I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 566cd2a I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 78a8261 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: a246c28 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 86b0073 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 34c5694 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 187045c I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 0082de8 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: fd3abbe I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 26b38ce I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 0f8b877 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 3fb7a98 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: c211c66 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: eaeb6ad I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 8268f6e I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: febfbae I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 58b1a60 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: ccf3d7e I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: a3db71b I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 458abcb I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 1e4f268 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: b36453d I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 6412ccd I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 90d4bc5 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 7dffaf0 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 3a7d869 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: d8bd676 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: a8ae385 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: ff11f2d I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: c58ac9e I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 176b952 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 8501c3b I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: c8eeea0 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 6651ec4 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: f94c078 Signed-off-by: vitorelourenco <vitor.registros@lourencos.net> Fix segment bug Style DCO Remediation Commit for vitorelourenco <vitor.registros@lourencos.net> I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 9297d5a I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 34a9840 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 5721943 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: a1afb6c I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 16c3c13 I, vitorelourenco <vitor.registros@lourencos.net>, hereby add my Signed-off-by to this commit: 92c1a26 Signed-off-by: vitorelourenco <vitor.registros@lourencos.net> Fix booleanValue Signed-off-by: vitorelourenco <vitor.registros@lourencos.net> Style Signed-off-by: vitorelourenco <vitor.registros@lourencos.net> update dep Signed-off-by: vitorelourenco <vitor.registros@lourencos.net> add licesing Signed-off-by: vitorelourenco <vitor.registros@lourencos.net> make tsql abstract Signed-off-by: vitorelourenco <vitor.registros@lourencos.net> add license Signed-off-by: vitorelourenco <vitor.registros@lourencos.net> add license Signed-off-by: vitorelourenco <vitor.registros@lourencos.net> remove comments Signed-off-by: vitorelourenco <vitor.registros@lourencos.net> Update package lock Add db sqlserver to tests package json Fix boolean compile Fix raw return false Add todo Update db-sqlserver.yaml Add README to tests Sync Fix docker image reference Update instructions Fix comment Update test setup Remove testtimeout setting fix changes Signed-off-by: vitorelourenco <vitor@lourencos.net> fix filter Signed-off-by: vitorelourenco <vitor@lourencos.net> undo trash Signed-off-by: vitorelourenco <vitor@lourencos.net> style Signed-off-by: vitorelourenco <vitor@lourencos.net> style Signed-off-by: vitorelourenco <vitor@lourencos.net> style Signed-off-by: vitorelourenco <vitor@lourencos.net> feat: Support specifying field type (malloydata#2417) chore: render limiting docs Version 0.0.295-dev [skip ci] Signed-off-by: Malloy CI Bot <malloy-ci-bot@malloydata.org> undo add dep Signed-off-by: vitorelourenco <vitor@lourencos.net> feat: Support specifying field type (malloydata#2417) chore: render limiting docs remove files Signed-off-by: vitorelourenco <vitor@lourencos.net> remove line Signed-off-by: vitorelourenco <vitor@lourencos.net> bump sqlserver version Signed-off-by: vitorelourenco <vitor@lourencos.net> Bump dep undo boolean compile Signed-off-by: vitorelourenco <vitor@lourencos.net>
68f2b2f to
1dfc1d8
Compare
This is mainly so we can discuss the decisions I had to make and how do we want to go about it.
Some major ones are the wrapping of the main select block (not fully done atm but we can talk about the approach)
groupByClauseinstead of onlyorderByClauseSupport for not needing regexp
The support for not having 'LIMIT' available in the dialect
Having booleans as numbers or expressions eg 1=1
The changes to malloy_query.ts are pretty significant.
This PR is expected to fail all sorts of tests but I feel like this is the point to start ping-ponging ideas.
Edit (may 16th, 2025) : I'm tyring to ditch the wrapping approach. Too many problems wit aliases in the internal query being unavailable to the outer query, specially FROM aliases.
I also had to create a tally/numbers table cause sqlserver can't generate sequences on the fly without a CTE in a simple manner
Edit (may 26th, 2025) : There are still things to sort out, its not ready for usage but I would like to make more incremental changes, possibly making tsql abstract as a base and having sqlserver, azure sql and synapse extending