Repository: tablelandnetwork/go-tableland
Pull request #413 (2022-12-09 14:22:37)

parser: drop support for ANY
# Summary

Update parser library to most recent commit `863bbd9f65273f3aef99101139a0f63a58a8d98e`

Changes included:
- Drop support for ANY




Patch:
diff --git a/go.mod b/go.mod
index 8b15d72..9c9af8e 100644
--- a/go.mod
+++ b/go.mod
@@ -22,7 +22,7 @@ require (
 	github.com/spf13/cobra v1.6.0
 	github.com/spruceid/siwe-go v0.2.1-0.20220804171946-fc1b0374f4ff
 	github.com/stretchr/testify v1.8.1
-	github.com/tablelandnetwork/sqlparser v0.0.0-20221206205623-de3c827d6e39
+	github.com/tablelandnetwork/sqlparser v0.0.0-20221209125022-863bbd9f6527
 	github.com/textileio/cli v1.0.2
 	go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0
 	go.opentelemetry.io/otel v1.11.0
diff --git a/go.sum b/go.sum
index cdc82bd..bf8e553 100644
--- a/go.sum
+++ b/go.sum
@@ -1320,6 +1320,8 @@ github.com/tablelandnetwork/sqlparser v0.0.0-20221206182935-9aa9abb23647 h1:pAC4
 github.com/tablelandnetwork/sqlparser v0.0.0-20221206182935-9aa9abb23647/go.mod h1:S+M/v3Q8X+236kQxMQziFcLId2Cscb1LzW06IUVhljE=
 github.com/tablelandnetwork/sqlparser v0.0.0-20221206205623-de3c827d6e39 h1:Xi7Bt60Na70O/k4uyy1ws5FnoxFS6xZuGPdCYQ/UCPQ=
 github.com/tablelandnetwork/sqlparser v0.0.0-20221206205623-de3c827d6e39/go.mod h1:S+M/v3Q8X+236kQxMQziFcLId2Cscb1LzW06IUVhljE=
+github.com/tablelandnetwork/sqlparser v0.0.0-20221209125022-863bbd9f6527 h1:cwTLUHmgeUSoV+cgvKfxG8zSjmCLTwrzBALjxVrPz/g=
+github.com/tablelandnetwork/sqlparser v0.0.0-20221209125022-863bbd9f6527/go.mod h1:S+M/v3Q8X+236kQxMQziFcLId2Cscb1LzW06IUVhljE=
 github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I=
 github.com/textileio/cli v1.0.2 h1:qSp/x4d/9SZ93TxhgZnE5okRKqzqHqrzAwKAPjuPw50=
 github.com/textileio/cli v1.0.2/go.mod h1:vTlCvvVyOmXXLwddCcBg3PDavfUsCkRBZoyr6Nu1lkc=


Test patch:
diff --git a/internal/tableland/impl/mesa_test.go b/internal/tableland/impl/mesa_test.go
index 6e7ff2b..3f8d045 100644
--- a/internal/tableland/impl/mesa_test.go
+++ b/internal/tableland/impl/mesa_test.go
@@ -64,27 +64,6 @@ func TestTodoAppWorkflow(t *testing.T) {
 	processCSV(ctx, t, chainID, caller, tbld, "testdata/todoapp_queries.csv", backend)
 }
 
-func TestAny(t *testing.T) {
-	t.Parallel()
-
-	setup := newTablelandSetupBuilder().
-		withAllowTransactionRelay(true).
-		build(t)
-	tablelandClient := setup.newTablelandClient(t)
-
-	ctx, chainID, backend, sc := setup.ctx, setup.chainID, setup.ethClient, setup.contract
-	tbld, txOpts := tablelandClient.tableland, tablelandClient.txOpts
-
-	caller := txOpts.From
-	_, err := sc.CreateTable(txOpts, caller,
-		`CREATE TABLE any_1337 (
-			wild ANY
-		  );`)
-	require.NoError(t, err)
-
-	processCSV(ctx, t, chainID, caller, tbld, "testdata/any_queries.csv", backend)
-}
-
 func TestInsertOnConflict(t *testing.T) {
 	t.Parallel()
 	// TODO: This test was passing because the "DO UPDATE SET" clause didn't have a table name.
diff --git a/internal/tableland/impl/testdata/any_queries.csv b/internal/tableland/impl/testdata/any_queries.csv
deleted file mode 100644
index ce8f32b..0000000
--- a/internal/tableland/impl/testdata/any_queries.csv
+++ /dev/null
@@ -1,3 +0,0 @@
-w,"INSERT INTO any_1337_1 VALUES ('hello')",""
-w,"INSERT INTO any_1337_1 VALUES (3)",""
-r,"SELECT * FROM any_1337_1","{""columns"":[{""name"":""wild""}],""rows"":[[""hello""],[3]]}"
diff --git a/pkg/eventprocessor/impl/eventprocessor_replayhistory_test.go b/pkg/eventprocessor/impl/eventprocessor_replayhistory_test.go
index ad9faba..ef15ffe 100644
--- a/pkg/eventprocessor/impl/eventprocessor_replayhistory_test.go
+++ b/pkg/eventprocessor/impl/eventprocessor_replayhistory_test.go
@@ -36,12 +36,12 @@ func TestReplayProductionHistory(t *testing.T) {
 
 	expectedStateHashes := map[tableland.ChainID]string{
 		1:      "ce4f083e256d3458a329b6cd1ba7d8e93d9703b3",
-		5:      "b42740b92e40d616061a88872e19616c05469750",
-		10:     "c9afca82a8c30fc683da366b5f4920e7c131ec5d",
+		5:      "08af7e7055f266ea75d3b06350c47a52cfa59843",
+		10:     "2bce2d62e7f5eeadc4736f470ca2959b871e5d91",
 		69:     "643af9ad784444242c6ef415727203941a720197",
 		137:    "b5fb42f3538738ab5856abf9e3b2e38d82378ca4",
 		420:    "184800f533f4edd186853a85829fad8bc7802c4e",
-		80001:  "df269d9451e0bf1b77c7616aff4148a3f1a4559a",
+		80001:  "9336d3a3a36e57a86e4f95d3464048c954e46bc6",
 		421613: "073727932afcee9a5dba19f43c023689ca855dc2",
 	}