Skip to content

Commit cbf0621

Browse files
- Elegant re-include sqlite3 mathematical functions.
1 parent 23ebb1a commit cbf0621

File tree

8 files changed

+19
-19
lines changed

8 files changed

+19
-19
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ on:
2626
- ".github/workflows/scenario.yaml"
2727

2828
env:
29-
GOTESTCMD: "go test -timeout 1200s --tags \"sqlite_stackql sqlite_math_functions\" -v ./..."
29+
GOTESTCMD: "go test -timeout 1200s --tags \"sqlite_stackql\" -v ./..."
3030
TESTSCRIPT: "test/python/main.py"
3131
GOPRIVATE: github.com/stackql/*
3232
GH_ACCESS_TOKEN: ${{ secrets.ACTIONS_PRIVATE_PACKAGE_SECRET }}
@@ -313,7 +313,7 @@ jobs:
313313
baselineRefFile="cicd/ref/bench/baseline-go-bench.log"
314314
thresholdRefFile="cicd/ref/bench/max-threshold-go-bench.log"
315315
go test -run='^$' -bench . -benchtime=100x -count=6 \
316-
--tags "sqlite_stackql sqlite_math_functions" --ldflags "-X stackql/internal/stackql/planbuilder.PlanCacheEnabled=false" \
316+
--tags "sqlite_stackql" --ldflags "-X stackql/internal/stackql/planbuilder.PlanCacheEnabled=false" \
317317
./... | tee ${outFile}
318318
# shellcheck disable=SC2181
319319
if [ "$?" = "0" ]; then
@@ -569,7 +569,7 @@ jobs:
569569
baselineRefFile="cicd/ref/bench/baseline-go-bench.log"
570570
thresholdRefFile="cicd/ref/bench/max-threshold-go-bench.log"
571571
go test -run='^$' -bench . -benchtime=100x -count=6 \
572-
--tags "sqlite_stackql sqlite_math_functions" --ldflags "-X stackql/internal/stackql/planbuilder.PlanCacheEnabled=false" \
572+
--tags "sqlite_stackql" --ldflags "-X stackql/internal/stackql/planbuilder.PlanCacheEnabled=false" \
573573
./... | tee ${outFile}
574574
# shellcheck disable=SC2181
575575
if [ "$?" = "0" ]; then

.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,9 @@
198198
"type": "pickString",
199199
"id": "buildFlags",
200200
"description": "Extra Build Flags for debug; cannot place elsewhere",
201-
"default": "-tags=sqlite_stackql sqlite_math_functions",
201+
"default": "-tags=sqlite_stackql",
202202
"options": [
203-
"-tags=sqlite_stackql sqlite_math_functions"
203+
"-tags=sqlite_stackql"
204204
]
205205
},
206206
{

.vscode/settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
"editor.insertSpaces": true,
1111
"cmake.configureOnOpen": false,
1212
"go.buildFlags": [
13-
"-tags=sqlite_stackql sqlite_math_functions"
13+
"-tags=sqlite_stackql"
1414
],
15-
"go.testTags": "sqlite_stackql sqlite_math_functions",
15+
"go.testTags": "sqlite_stackql",
1616
"todohighlight.keywordsPattern": "TODO:|FIXME:|BLOCK|END_BLOCK", //highlight `TODO:`,`FIXME:` or commented content between parentheses
1717
"todohighlight.exclude": [
1818
"**/*.json"

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ ENV SRC_DIR=/work/stackql/src
4444
ENV BUILD_DIR=/work/stackql/build
4545

4646
RUN cd ${SRC_DIR} \
47-
&& go test --tags "sqlite_stackql sqlite_math_functions" ./... \
47+
&& go test --tags "sqlite_stackql" ./... \
4848
&& go build -ldflags "-X github.com/stackql/stackql/internal/stackql/cmd.BuildMajorVersion=$BUILDMAJORVERSION \
4949
-X github.com/stackql/stackql/internal/stackql/cmd.BuildMinorVersion=$BUILDMINORVERSION \
5050
-X github.com/stackql/stackql/internal/stackql/cmd.BuildPatchVersion=$BUILDPATCHVERSION \
@@ -53,7 +53,7 @@ RUN cd ${SRC_DIR} \
5353
-X \"github.com/stackql/stackql/internal/stackql/cmd.BuildDate=$BUILDDATE\" \
5454
-X \"stackql/internal/stackql/planbuilder.PlanCacheEnabled=$PLANCACHEENABLED\" \
5555
-X github.com/stackql/stackql/internal/stackql/cmd.BuildPlatform=$BUILDPLATFORM" \
56-
--tags "sqlite_stackql sqlite_math_functions" \
56+
--tags "sqlite_stackql" \
5757
-o ${BUILD_DIR}/stackql ./stackql
5858

5959
FROM python:3.11-bullseye AS utility

cicd/python/build.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def build_stackql(verbose :bool) -> int:
1313
os.environ['BUILDPATCHVERSION'] = os.environ.get('BUILDPATCHVERSION', '1')
1414
os.environ['CGO_ENABLED'] = os.environ.get('CGO_ENABLED', '1')
1515
return subprocess.call(
16-
f'go build {"-x -v" if verbose else ""} --tags "sqlite_stackql sqlite_math_functions" -ldflags "-X github.com/stackql/stackql/internal/stackql/cmd.BuildMajorVersion={os.environ.get("BUILDMAJORVERSION")} '
16+
f'go build {"-x -v" if verbose else ""} --tags "sqlite_stackql" -ldflags "-X github.com/stackql/stackql/internal/stackql/cmd.BuildMajorVersion={os.environ.get("BUILDMAJORVERSION")} '
1717
f'-X github.com/stackql/stackql/internal/stackql/cmd.BuildMinorVersion={os.environ.get("BUILDMINORVERSION")} '
1818
f'-X github.com/stackql/stackql/internal/stackql/cmd.BuildPatchVersion={os.environ.get("BUILDPATCHVERSION")} '
1919
f'-X github.com/stackql/stackql/internal/stackql/cmd.BuildCommitSHA={os.environ.get("BUILDCOMMITSHA", "")} '
@@ -28,7 +28,7 @@ def build_stackql(verbose :bool) -> int:
2828

2929
def unit_test_stackql(verbose :bool) -> int:
3030
return subprocess.call(
31-
f'go test -timeout 1200s {"-v" if verbose else ""} --tags "sqlite_stackql sqlite_math_functions" ./...',
31+
f'go test -timeout 1200s {"-v" if verbose else ""} --tags "sqlite_stackql" ./...',
3232
shell=True
3333
)
3434

docs/developer_guide.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ As of now, `stackql` handles `xml` SERDE through the core, and does not route th
4949

5050
```bash
5151
env CGO_ENABLED=1 go build \
52-
--tags "sqlite_stackql sqlite_math_functions" \
52+
--tags "sqlite_stackql" \
5353
-ldflags "-X github.com/stackql/stackql/internal/stackql/cmd.BuildMajorVersion=${BUILDMAJORVERSION:-1} \
5454
-X github.com/stackql/stackql/internal/stackql/cmd.BuildMinorVersion=${BUILDMINORVERSION:-1} \
5555
-X github.com/stackql/stackql/internal/stackql/cmd.BuildPatchVersion=${BUILDPATCHVERSION:-1} \
@@ -69,7 +69,7 @@ At this time, we are not dogmatic about how to implement unit tests. Aspiration
6969
To run all unit tests:
7070

7171
```bash
72-
go test -timeout 1200s --tags "sqlite_stackql sqlite_math_functions" ./...
72+
go test -timeout 1200s --tags "sqlite_stackql" ./...
7373
```
7474

7575
### Robot tests
@@ -184,7 +184,7 @@ Requirements are [detailed in the root README](/README.md#system-requirements).
184184

185185
Local testing of the application:
186186

187-
1. Run `go test --tags "sqlite_stackql sqlite_math_functions" ./...` tests.
187+
1. Run `go test --tags "sqlite_stackql" ./...` tests.
188188
2. Build the executable [as per the root README](/README.md#build)
189189
3. Perform registry rewrites as needed for mocking `python3 test/python/registry-rewrite.py`.
190190
3. Run robot tests:
@@ -203,7 +203,7 @@ Test coverage is sparse. Regressions are mitigated by `go test` integration tes
203203
#### Point in time gotest coverage
204204

205205
If not already done, then install 'cover' with `go get golang.org/x/tools/cmd/cover`.
206-
Then: `go test --tags "sqlite_stackql sqlite_math_functions" -cover ../...`.
206+
Then: `go test --tags "sqlite_stackql" -cover ../...`.
207207

208208
### Functional and Integration testing
209209

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require (
1212
github.com/jackc/pgx/v5 v5.0.4
1313
github.com/lib/pq v1.10.4
1414
github.com/magiconair/properties v1.8.6
15-
github.com/mattn/go-sqlite3 v1.0.2-stackql
15+
github.com/mattn/go-sqlite3 v1.0.3-stackql
1616
github.com/olekukonko/tablewriter v0.0.0-20180130162743-b8a9be070da4
1717
github.com/sirupsen/logrus v1.9.0
1818
github.com/snowflakedb/gosnowflake v1.6.16
@@ -130,4 +130,4 @@ require (
130130

131131
replace github.com/chzyer/readline => github.com/stackql/readline v0.0.2-alpha05
132132

133-
replace github.com/mattn/go-sqlite3 => github.com/stackql/stackql-go-sqlite3 v1.0.2-stackql
133+
replace github.com/mattn/go-sqlite3 => github.com/stackql/stackql-go-sqlite3 v1.0.3-stackql

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,8 +490,8 @@ github.com/stackql/psql-wire v0.1.1-alpha07 h1:LQWVUlx4Bougk6dztDNG5tmXxpIVeeTSs
490490
github.com/stackql/psql-wire v0.1.1-alpha07/go.mod h1:a44Wd8kDC3irFLpGutarKDBqhJ/aqXlj1aMzO5bVJYg=
491491
github.com/stackql/readline v0.0.2-alpha05 h1:ID4QzGdplFBsrSnTuz8pvKzWw96JbrJg8fsLry2UriU=
492492
github.com/stackql/readline v0.0.2-alpha05/go.mod h1:OFAYOdXk/X4+5GYiDXFfaGrk+bCN6Qv0SYY5HNzD2E0=
493-
github.com/stackql/stackql-go-sqlite3 v1.0.2-stackql h1:HyctYfBzMth/fIs2Y+9c/SICsCvR/DEnzcI7VZgwGZo=
494-
github.com/stackql/stackql-go-sqlite3 v1.0.2-stackql/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
493+
github.com/stackql/stackql-go-sqlite3 v1.0.3-stackql h1:j0yt6T5thZuz5+HIr81PXz2AClAtCko0vzr5tm8C1g8=
494+
github.com/stackql/stackql-go-sqlite3 v1.0.3-stackql/go.mod h1:HemqCrcMK2xyhMMMt6oZ7ERDtoSmyyDsw5LBBcTZ+Rk=
495495
github.com/stackql/stackql-parser v0.0.14-alpha04 h1:CmZUDWf2jBbU+Zu3sdiuM5CwUBFGN/IFjzXPcu46xjs=
496496
github.com/stackql/stackql-parser v0.0.14-alpha04/go.mod h1:iyB47SvRS+Fvpn7joF7mHAkeiWSq83TbUhglRmLzPLQ=
497497
github.com/stackql/stackql-provider-registry v0.0.1-rc06 h1:MgroWOr0bSqjSTDGnXB0UoZGFXpW3SRtN0EFkzB8Rpo=

0 commit comments

Comments
 (0)