Skip to content

Commit

Permalink
sql: turn on hstream_enable_schema flag by default (#1550)
Browse files Browse the repository at this point in the history
* sql: fix incorrect subquery planning

* sql: turn on `hstream_enable_schema` flag by default
  • Loading branch information
Commelina authored Aug 11, 2023
1 parent f1b1f93 commit a9df504
Show file tree
Hide file tree
Showing 11 changed files with 247 additions and 136 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ HSTREAM_VERSION ?= $(or $(shell git describe --tag --abbrev=0 2>/dev/null), unkn
HSTREAM_VERSION_COMMIT ?= $(or $(shell git rev-parse HEAD 2>/dev/null), unknown)

ENGINE_VERSION ?= v1
SQL_ENABLE_SCHEMA ?= false
SQL_ENABLE_SCHEMA ?= true

ifeq ($(strip $(SQL_ENABLE_SCHEMA)), true)
CABAL_BUILD_FLAGS += +hstream_enable_schema
Expand Down
4 changes: 2 additions & 2 deletions common/hstream/hstream-common.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ library
, bytestring
, casing >=0.1.4
, containers
, cryptonite
, data-default
, deepseq
, digest
Expand All @@ -115,6 +116,7 @@ library
, hstream-common-base
, http-client
, http-types
, memory
, optparse-applicative
, primitive ^>=0.7
, proto3-suite
Expand All @@ -132,8 +134,6 @@ library
, zlib
, zoovisitor
, zstd
, memory
, cryptonite

cxx-options: -std=c++17
cpp-options: -std=c++17
Expand Down
2 changes: 1 addition & 1 deletion external/protocol
Submodule protocol updated 1 files
+21 −0 hstream.proto
2 changes: 1 addition & 1 deletion hstream-processing/hstream-processing.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ flag ReleaseBuild
Enables all optimisations, leads to slower build time and better performance

flag hstream_enable_schema
default: False
default: True
description:
Save schema with streams and enable schema-related pipelines

Expand Down
24 changes: 12 additions & 12 deletions hstream-sql/etc/plan-test-cases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,29 @@
testSuiteCases:
- testCaseFail: null
testCaseLabel: not(BETWEEN)
testCaseResult: "Project (name=xNOTBETWEENSYMMETRIC0AND42, alias=xNOTBETWEENSYMMETRIC0AND42)
[]\n Affiliate (name=xNOTBETWEENSYMMETRIC0AND42, expr=OpNotBetweenSymAnd(#(x),
ConstantInt 0, ConstantInt 42)) \n StreamScan s"
testCaseResult: |-
Project (OpNotBetweenSymAnd(0.#0,0,42)) | (#0_xNOTBETWEENSYMMETRIC0AND42:bool)
Scan s | (#0_x:int)
testCaseStmts:
- select x not between symmetric 0 and 42 from s;
- testCaseFail: null
testCaseLabel: not(BETWEEN)
testCaseResult: "Project (name=xNOTBETWEENSYMMETRIC0AND42, alias=xNOTBETWEENSYMMETRIC0AND42)
[]\n Affiliate (name=xNOTBETWEENSYMMETRIC0AND42, expr=OpNotBetweenSymAnd(#(x),
ConstantInt 0, ConstantInt 42)) \n StreamScan s"
testCaseResult: |-
Project (OpNotBetweenSymAnd(0.#0,0,42)) | (#0_xNOTBETWEENSYMMETRIC0AND42:bool)
Scan s | (#0_x:int)
testCaseStmts:
- select x not between symmetric 0 and 42 from s;
- testCaseFail: null
testCaseLabel: not(BETWEEN)
testCaseResult: "Project (name=xNOTBETWEENSYMMETRIC0AND42, alias=xNOTBETWEENSYMMETRIC0AND42)
[]\n Affiliate (name=xNOTBETWEENSYMMETRIC0AND42, expr=OpNotBetweenSymAnd(#(x),
ConstantInt 0, ConstantInt 42)) \n StreamScan s"
testCaseResult: |-
Project (OpNotBetweenSymAnd(0.#0,0,42)) | (#0_xNOTBETWEENSYMMETRIC0AND42:bool)
Scan s | (#0_x:int)
testCaseStmts:
- select x not between symmetric 0 and 42 from s;
- testCaseFail: null
testCaseLabel: not(BETWEEN)
testCaseResult: "Project (name=xNOTBETWEENSYMMETRIC0AND42, alias=xNOTBETWEENSYMMETRIC0AND42)
[]\n Affiliate (name=xNOTBETWEENSYMMETRIC0AND42, expr=OpNotBetweenSymAnd(#(x),
ConstantInt 0, ConstantInt 42)) \n StreamScan s"
testCaseResult: |-
Project (OpNotBetweenSymAnd(0.#0,0,42)) | (#0_xNOTBETWEENSYMMETRIC0AND42:bool)
Scan s | (#0_x:int)
testCaseStmts:
- select x not between symmetric 0 and 42 from s;
Loading

0 comments on commit a9df504

Please sign in to comment.