mirror of
https://github.com/dolthub/dolt.git
synced 2026-03-17 23:56:33 -05:00
remove more dead stuff
This commit is contained in:
@@ -62,11 +62,8 @@ func Stat(ctx context.Context, ch chan DiffStatProgress, from, to durable.Index,
|
||||
return fmt.Errorf("cannot perform a diff between keyless and keyed schema")
|
||||
}
|
||||
|
||||
if types.IsFormat_DOLT(from.Format()) {
|
||||
return diffProllyTrees(ctx, ch, keyless, from, to, fromSch, toSch)
|
||||
}
|
||||
|
||||
panic("Unsupported format: " + from.Format().VersionString())
|
||||
types.AssertFormat_DOLT(from.Format())
|
||||
return diffProllyTrees(ctx, ch, keyless, from, to, fromSch, toSch)
|
||||
}
|
||||
|
||||
// StatForTableDelta pushes diff stat progress messages for the table delta given to the channel given
|
||||
|
||||
@@ -325,12 +325,8 @@ func TestKeylessMergeConflicts(t *testing.T) {
|
||||
}
|
||||
|
||||
func assertConflicts(t *testing.T, ctx context.Context, tbl *doltdb.Table, expected conflictEntries) {
|
||||
if types.IsFormat_DOLT(tbl.Format()) {
|
||||
assertProllyConflicts(t, ctx, tbl, expected)
|
||||
return
|
||||
}
|
||||
|
||||
panic("unsupported format: " + tbl.Format().VersionString())
|
||||
types.AssertFormat_DOLT(tbl.Format())
|
||||
assertProllyConflicts(t, ctx, tbl, expected)
|
||||
}
|
||||
|
||||
func assertProllyConflicts(t *testing.T, ctx context.Context, tbl *doltdb.Table, expected conflictEntries) {
|
||||
@@ -409,12 +405,8 @@ func mustGetRowValueFromRootIsh(t *testing.T, ctx context.Context, vrw types.Val
|
||||
|
||||
// |expected| is a tupleSet to compensate for random storage order
|
||||
func assertKeylessRows(t *testing.T, ctx context.Context, tbl *doltdb.Table, expected keylessEntries) {
|
||||
if types.IsFormat_DOLT(tbl.Format()) {
|
||||
assertKeylessProllyRows(t, ctx, tbl, expected)
|
||||
return
|
||||
}
|
||||
|
||||
panic("unsupported format: " + tbl.Format().VersionString())
|
||||
types.AssertFormat_DOLT(tbl.Format())
|
||||
assertKeylessProllyRows(t, ctx, tbl, expected)
|
||||
}
|
||||
|
||||
func assertKeylessProllyRows(t *testing.T, ctx context.Context, tbl *doltdb.Table, expected []keylessEntry) {
|
||||
|
||||
@@ -212,6 +212,8 @@ func (rm *RootMerger) MergeTable(
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
types.AssertFormat_DOLT(tm.vrw.Format())
|
||||
|
||||
// short-circuit here if we can
|
||||
finished, finishedRootObj, stats, err := rm.MaybeShortCircuit(ctx, tm, mergeOpts)
|
||||
if finished != nil || finishedRootObj != nil || stats != nil || err != nil {
|
||||
@@ -242,11 +244,7 @@ func (rm *RootMerger) MergeTable(
|
||||
var tbl *doltdb.Table
|
||||
var rootObj doltdb.RootObject
|
||||
if !tm.InvolvesRootObjects() {
|
||||
if types.IsFormat_DOLT(tm.vrw.Format()) {
|
||||
tbl, stats, err = mergeProllyTable(ctx, tm, mergeSch, mergeInfo, diffInfo)
|
||||
} else {
|
||||
panic("data format not supported in this version of Dolt")
|
||||
}
|
||||
tbl, stats, err = mergeProllyTable(ctx, tm, mergeSch, mergeInfo, diffInfo)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
@@ -297,10 +297,6 @@ var testRows = []testRow{
|
||||
}
|
||||
|
||||
func TestMergeCommits(t *testing.T) {
|
||||
if !types.IsFormat_DOLT(types.Format_Default) {
|
||||
t.Skip()
|
||||
}
|
||||
|
||||
ddb, vrw, ns, rightCommitHash, ancCommitHash, root, mergeRoot, ancRoot, expectedRows, expectedArtifacts := setupMergeTest(t)
|
||||
defer ddb.Close()
|
||||
merger, err := NewMerger(root, mergeRoot, ancRoot, rightCommitHash, ancCommitHash, vrw, ns)
|
||||
|
||||
@@ -40,7 +40,6 @@ import (
|
||||
"github.com/dolthub/dolt/go/libraries/doltcore/table/editor"
|
||||
"github.com/dolthub/dolt/go/store/hash"
|
||||
"github.com/dolthub/dolt/go/store/prolly/tree"
|
||||
"github.com/dolthub/dolt/go/store/types"
|
||||
)
|
||||
|
||||
type schemaMergeTest struct {
|
||||
@@ -1654,7 +1653,6 @@ func testSchemaMergeHelper(t *testing.T, tests []schemaMergeTest, flipSides bool
|
||||
eo = eo.WithDeaf(editor.NewInMemDeaf(a.VRW()))
|
||||
// attempt merge before skipping to assert no panics
|
||||
result, err := merge.MergeRoots(sql.NewContext(ctx), doltdb.SimpleTableResolver{}, l, r, a, rootish{r}, rootish{a}, eo, mo)
|
||||
maybeSkip(t, a.VRW().Format(), test, flipSides)
|
||||
|
||||
if test.conflict {
|
||||
// TODO: Test the conflict error message more deeply
|
||||
@@ -1829,18 +1827,6 @@ func verifyMerge(t *testing.T, ctx context.Context, m doltdb.RootValue, result *
|
||||
}
|
||||
}
|
||||
|
||||
func maybeSkip(t *testing.T, nbf *types.NomsBinFormat, test schemaMergeTest, flipSides bool) {
|
||||
if types.IsFormat_DOLT(nbf) {
|
||||
if test.skipNewFmt || flipSides && test.skipFlipOnNewFormat {
|
||||
t.Skip()
|
||||
}
|
||||
} else {
|
||||
if test.skipOldFmt || flipSides && test.skipFlipOnOldFormat {
|
||||
t.Skip()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func tbl(ns namedSchema, rows ...sql.Row) *table {
|
||||
return &table{ns: ns, rows: rows}
|
||||
}
|
||||
|
||||
@@ -63,11 +63,11 @@ type FKViolationReceiver interface {
|
||||
// RegisterForeignKeyViolations emits constraint violations that have been created as a
|
||||
// result of the diff between |baseRoot| and |newRoot|. It sends violations to |receiver|.
|
||||
func RegisterForeignKeyViolations(
|
||||
ctx *sql.Context,
|
||||
tableResolver doltdb.TableResolver,
|
||||
newRoot, baseRoot doltdb.RootValue,
|
||||
tables *doltdb.TableNameSet,
|
||||
receiver FKViolationReceiver,
|
||||
ctx *sql.Context,
|
||||
tableResolver doltdb.TableResolver,
|
||||
newRoot, baseRoot doltdb.RootValue,
|
||||
tables *doltdb.TableNameSet,
|
||||
receiver FKViolationReceiver,
|
||||
) error {
|
||||
fkColl, err := newRoot.GetForeignKeyCollection(ctx)
|
||||
if err != nil {
|
||||
@@ -259,41 +259,36 @@ func (f *foreignKeyViolationWriter) StartFK(ctx *sql.Context, fk doltdb.ForeignK
|
||||
return err
|
||||
}
|
||||
|
||||
if types.IsFormat_DOLT(tbl.Format()) {
|
||||
arts, err := tbl.GetArtifacts(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
artMap := durable.ProllyMapFromArtifactIndex(arts)
|
||||
f.artEditor = artMap.Editor()
|
||||
f.cInfoJsonData = jsonData
|
||||
f.kd = sch.GetKeyDescriptor(tbl.NodeStore())
|
||||
} else {
|
||||
panic("Unsupported formant: " + tbl.Format().VersionString())
|
||||
types.AssertFormat_DOLT(tbl.Format())
|
||||
arts, err := tbl.GetArtifacts(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
artMap := durable.ProllyMapFromArtifactIndex(arts)
|
||||
f.artEditor = artMap.Editor()
|
||||
f.cInfoJsonData = jsonData
|
||||
f.kd = sch.GetKeyDescriptor(tbl.NodeStore())
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (f *foreignKeyViolationWriter) EndCurrFK(ctx context.Context) error {
|
||||
if types.IsFormat_DOLT(f.currTbl.Format()) {
|
||||
artMap, err := f.artEditor.Flush(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
artIdx := durable.ArtifactIndexFromProllyMap(artMap)
|
||||
tbl, err := f.currTbl.SetArtifacts(ctx, artIdx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
f.rootValue, err = f.rootValue.PutTable(ctx, f.currFk.TableName, tbl)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
types.AssertFormat_DOLT(f.currTbl.Format())
|
||||
|
||||
panic("Unsupported format: " + f.currTbl.Format().VersionString())
|
||||
artMap, err := f.artEditor.Flush(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
artIdx := durable.ArtifactIndexFromProllyMap(artMap)
|
||||
tbl, err := f.currTbl.SetArtifacts(ctx, artIdx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
f.rootValue, err = f.rootValue.PutTable(ctx, f.currFk.TableName, tbl)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (f *foreignKeyViolationWriter) NomsFKViolationFound(ctx context.Context, rowKey, rowValue types.Tuple) error {
|
||||
@@ -325,11 +320,11 @@ var _ FKViolationReceiver = (*foreignKeyViolationWriter)(nil)
|
||||
|
||||
// parentFkConstraintViolations processes foreign key constraint violations for the parent in a foreign key.
|
||||
func parentFkConstraintViolations(
|
||||
ctx context.Context,
|
||||
foreignKey doltdb.ForeignKey,
|
||||
preParent, postParent, postChild *constraintViolationsLoadedTable,
|
||||
preParentRowData durable.Index,
|
||||
receiver FKViolationReceiver,
|
||||
ctx context.Context,
|
||||
foreignKey doltdb.ForeignKey,
|
||||
preParent, postParent, postChild *constraintViolationsLoadedTable,
|
||||
preParentRowData durable.Index,
|
||||
receiver FKViolationReceiver,
|
||||
) error {
|
||||
if preParentRowData.Format() != types.Format_DOLT {
|
||||
panic("unsupported format: " + preParentRowData.Format().VersionString())
|
||||
@@ -365,12 +360,12 @@ func parentFkConstraintViolations(
|
||||
// childFkConstraintViolations handles processing the reference options on a child, or creating a violation if
|
||||
// necessary.
|
||||
func childFkConstraintViolations(
|
||||
ctx context.Context,
|
||||
vr types.ValueReader,
|
||||
foreignKey doltdb.ForeignKey,
|
||||
postParent, postChild, preChild *constraintViolationsLoadedTable,
|
||||
preChildRowData durable.Index,
|
||||
receiver FKViolationReceiver,
|
||||
ctx context.Context,
|
||||
vr types.ValueReader,
|
||||
foreignKey doltdb.ForeignKey,
|
||||
postParent, postChild, preChild *constraintViolationsLoadedTable,
|
||||
preChildRowData durable.Index,
|
||||
receiver FKViolationReceiver,
|
||||
) error {
|
||||
if preChildRowData.Format() != types.Format_DOLT {
|
||||
panic("unsupported format: " + preChildRowData.Format().VersionString())
|
||||
@@ -407,11 +402,11 @@ func childFkConstraintViolations(
|
||||
// newConstraintViolationsLoadedTable returns a *constraintViolationsLoadedTable. Returns false if the table was loaded
|
||||
// but the index could not be found. If the table could not be found, then an error is returned.
|
||||
func newConstraintViolationsLoadedTable(
|
||||
ctx *sql.Context,
|
||||
tableResolver doltdb.TableResolver,
|
||||
tblName doltdb.TableName,
|
||||
idxName string,
|
||||
root doltdb.RootValue,
|
||||
ctx *sql.Context,
|
||||
tableResolver doltdb.TableResolver,
|
||||
tblName doltdb.TableName,
|
||||
idxName string,
|
||||
root doltdb.RootValue,
|
||||
) (*constraintViolationsLoadedTable, bool, error) {
|
||||
trueTblName, tbl, ok, err := tableResolver.ResolveTableInsensitive(ctx, root, tblName)
|
||||
if err != nil {
|
||||
|
||||
@@ -622,18 +622,12 @@ func TestTruncate(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestConvert(t *testing.T) {
|
||||
if types.IsFormat_LD(types.Format_Default) {
|
||||
t.Skip("noms format has outdated type enforcement")
|
||||
}
|
||||
h := newDoltHarness(t)
|
||||
defer h.Close()
|
||||
enginetest.TestConvertPrepared(t, h)
|
||||
}
|
||||
|
||||
func TestConvertPrepared(t *testing.T) {
|
||||
if types.IsFormat_LD(types.Format_Default) {
|
||||
t.Skip("noms format has outdated type enforcement")
|
||||
}
|
||||
h := newDoltHarness(t)
|
||||
defer h.Close()
|
||||
enginetest.TestConvertPrepared(t, h)
|
||||
|
||||
@@ -802,9 +802,7 @@ func RunDoltDdlScripts(t *testing.T, harness DoltEnginetestHarness) {
|
||||
require.NoError(t, err)
|
||||
enginetest.TestScriptWithEngine(t, e, harness, script)
|
||||
}
|
||||
if !types.IsFormat_DOLT(types.Format_Default) {
|
||||
t.Skip("not fixing unique index on keyless tables for old format")
|
||||
}
|
||||
|
||||
for _, script := range AddIndexScripts {
|
||||
e, err := harness.NewEngine(t)
|
||||
require.NoError(t, err)
|
||||
|
||||
@@ -86,21 +86,18 @@ type IndexLookupKeyIterator interface {
|
||||
NextKey(ctx *sql.Context) (row.TaggedValues, error)
|
||||
}
|
||||
|
||||
func NewRangePartitionIter(ctx *sql.Context, t DoltTableable, lookup sql.IndexLookup, isDoltFmt bool) (sql.PartitionIter, error) {
|
||||
func NewRangePartitionIter(ctx *sql.Context, t DoltTableable, lookup sql.IndexLookup) (sql.PartitionIter, error) {
|
||||
mysqlRanges := lookup.Ranges.(sql.MySQLRangeCollection)
|
||||
idx := lookup.Index.(*doltIndex)
|
||||
if lookup.IsPointLookup && isDoltFmt {
|
||||
if lookup.IsPointLookup {
|
||||
return newPointPartitionIter(ctx, lookup, idx)
|
||||
}
|
||||
|
||||
var prollyRanges []prolly.Range
|
||||
var nomsRanges []*noms.ReadRange
|
||||
var err error
|
||||
if isDoltFmt {
|
||||
prollyRanges, err = idx.prollyRanges(ctx, idx.ns, mysqlRanges...)
|
||||
} else {
|
||||
nomsRanges, err = idx.nomsRanges(ctx, mysqlRanges...)
|
||||
}
|
||||
prollyRanges, err = idx.prollyRanges(ctx, idx.ns, mysqlRanges...)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -108,7 +105,6 @@ func NewRangePartitionIter(ctx *sql.Context, t DoltTableable, lookup sql.IndexLo
|
||||
nomsRanges: nomsRanges,
|
||||
prollyRanges: prollyRanges,
|
||||
curr: 0,
|
||||
isDoltFmt: isDoltFmt,
|
||||
isReverse: lookup.IsReverse,
|
||||
}, nil
|
||||
}
|
||||
@@ -291,7 +287,6 @@ func NewIndexReaderBuilder(
|
||||
key doltdb.DataCacheKey,
|
||||
projections []uint64,
|
||||
pkSch sql.PrimaryKeySchema,
|
||||
isDoltFormat bool,
|
||||
) (IndexScanBuilder, error) {
|
||||
if projections == nil {
|
||||
projections = idx.Schema().GetAllCols().Tags
|
||||
@@ -309,24 +304,20 @@ func NewIndexReaderBuilder(
|
||||
projections: projections,
|
||||
}
|
||||
|
||||
if isDoltFormat {
|
||||
secondaryIndex := durable.MapFromIndex(s.Secondary)
|
||||
base.ns = secondaryIndex.NodeStore()
|
||||
base.secKd, base.secVd = secondaryIndex.Descriptors()
|
||||
base.prefDesc = base.secKd.PrefixDesc(len(di.columns))
|
||||
switch si := secondaryIndex.(type) {
|
||||
case prolly.Map:
|
||||
base.sec = si
|
||||
case prolly.ProximityMap:
|
||||
base.proximitySecondary = si
|
||||
default:
|
||||
return nil, fmt.Errorf("unknown index type %v", secondaryIndex)
|
||||
}
|
||||
secondaryIndex := durable.MapFromIndex(s.Secondary)
|
||||
base.ns = secondaryIndex.NodeStore()
|
||||
base.secKd, base.secVd = secondaryIndex.Descriptors()
|
||||
base.prefDesc = base.secKd.PrefixDesc(len(di.columns))
|
||||
switch si := secondaryIndex.(type) {
|
||||
case prolly.Map:
|
||||
base.sec = si
|
||||
case prolly.ProximityMap:
|
||||
base.proximitySecondary = si
|
||||
default:
|
||||
return nil, fmt.Errorf("unknown index type %v", secondaryIndex)
|
||||
}
|
||||
|
||||
switch {
|
||||
case !isDoltFormat:
|
||||
panic("Unsupported format " + idx.Format().VersionString())
|
||||
case sql.IsKeyless(pkSch.Schema):
|
||||
return &keylessIndexImplBuilder{
|
||||
baseIndexImplBuilder: base,
|
||||
|
||||
@@ -20,7 +20,6 @@ import (
|
||||
"github.com/dolthub/go-mysql-server/sql"
|
||||
|
||||
"github.com/dolthub/dolt/go/libraries/doltcore/sqle/index"
|
||||
"github.com/dolthub/dolt/go/store/types"
|
||||
)
|
||||
|
||||
// IndexedDoltTable is a wrapper for a DoltTable. It implements the sql.Table interface like
|
||||
@@ -30,16 +29,14 @@ type IndexedDoltTable struct {
|
||||
idx index.DoltIndex
|
||||
lb index.IndexScanBuilder
|
||||
*DoltTable
|
||||
mu *sync.Mutex
|
||||
isDoltFormat bool
|
||||
mu *sync.Mutex
|
||||
}
|
||||
|
||||
func NewIndexedDoltTable(t *DoltTable, idx index.DoltIndex) *IndexedDoltTable {
|
||||
return &IndexedDoltTable{
|
||||
DoltTable: t,
|
||||
idx: idx,
|
||||
isDoltFormat: types.IsFormat_DOLT(t.Format()),
|
||||
mu: &sync.Mutex{},
|
||||
DoltTable: t,
|
||||
idx: idx,
|
||||
mu: &sync.Mutex{},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,13 +55,13 @@ func (t *IndexedDoltTable) LookupBuilder(ctx *sql.Context) (index.IndexScanBuild
|
||||
return nil, err
|
||||
}
|
||||
if t.lb == nil || !canCache || t.lb.Key() != key {
|
||||
return index.NewIndexReaderBuilder(ctx, t.DoltTable, t.idx, key, t.DoltTable.projectedCols, t.DoltTable.sqlSch, t.isDoltFormat)
|
||||
return index.NewIndexReaderBuilder(ctx, t.DoltTable, t.idx, key, t.DoltTable.projectedCols, t.DoltTable.sqlSch)
|
||||
}
|
||||
return t.lb, nil
|
||||
}
|
||||
|
||||
func (idt *IndexedDoltTable) LookupPartitions(ctx *sql.Context, lookup sql.IndexLookup) (sql.PartitionIter, error) {
|
||||
return index.NewRangePartitionIter(ctx, idt.DoltTable, lookup, idt.isDoltFormat)
|
||||
return index.NewRangePartitionIter(ctx, idt.DoltTable, lookup)
|
||||
}
|
||||
|
||||
func (idt *IndexedDoltTable) Partitions(ctx *sql.Context) (sql.PartitionIter, error) {
|
||||
@@ -80,7 +77,7 @@ func (idt *IndexedDoltTable) PartitionRows(ctx *sql.Context, part sql.Partition)
|
||||
}
|
||||
|
||||
if idt.lb == nil || !canCache || idt.lb.Key() != key {
|
||||
idt.lb, err = index.NewIndexReaderBuilder(ctx, idt.DoltTable, idt.idx, key, idt.DoltTable.projectedCols, idt.DoltTable.sqlSch, idt.isDoltFormat)
|
||||
idt.lb, err = index.NewIndexReaderBuilder(ctx, idt.DoltTable, idt.idx, key, idt.DoltTable.projectedCols, idt.DoltTable.sqlSch)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -97,7 +94,7 @@ func (idt *IndexedDoltTable) PartitionRows2(ctx *sql.Context, part sql.Partition
|
||||
return nil, err
|
||||
}
|
||||
if idt.lb == nil || !canCache || idt.lb.Key() != key {
|
||||
idt.lb, err = index.NewIndexReaderBuilder(ctx, idt.DoltTable, idt.idx, key, idt.DoltTable.projectedCols, idt.DoltTable.sqlSch, idt.isDoltFormat)
|
||||
idt.lb, err = index.NewIndexReaderBuilder(ctx, idt.DoltTable, idt.idx, key, idt.DoltTable.projectedCols, idt.DoltTable.sqlSch)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -117,7 +114,6 @@ func NewWritableIndexedDoltTable(t *WritableDoltTable, idx index.DoltIndex) *Wri
|
||||
return &WritableIndexedDoltTable{
|
||||
WritableDoltTable: t,
|
||||
idx: idx,
|
||||
isDoltFormat: types.IsFormat_DOLT(idx.Format()),
|
||||
mu: &sync.Mutex{},
|
||||
}
|
||||
}
|
||||
@@ -126,8 +122,7 @@ type WritableIndexedDoltTable struct {
|
||||
idx index.DoltIndex
|
||||
lb index.IndexScanBuilder
|
||||
*WritableDoltTable
|
||||
mu *sync.Mutex
|
||||
isDoltFormat bool
|
||||
mu *sync.Mutex
|
||||
}
|
||||
|
||||
func (t *WritableIndexedDoltTable) Index() index.DoltIndex {
|
||||
@@ -142,7 +137,7 @@ func (t *WritableIndexedDoltTable) LookupBuilder(ctx *sql.Context) (index.IndexS
|
||||
return nil, err
|
||||
}
|
||||
if t.lb == nil || !canCache || t.lb.Key() != key {
|
||||
return index.NewIndexReaderBuilder(ctx, t.DoltTable, t.idx, key, t.DoltTable.projectedCols, t.DoltTable.sqlSch, t.isDoltFormat)
|
||||
return index.NewIndexReaderBuilder(ctx, t.DoltTable, t.idx, key, t.DoltTable.projectedCols, t.DoltTable.sqlSch)
|
||||
}
|
||||
return t.lb, nil
|
||||
}
|
||||
@@ -151,7 +146,7 @@ func (t *WritableIndexedDoltTable) LookupPartitions(ctx *sql.Context, lookup sql
|
||||
if lookup.VectorOrderAndLimit.OrderBy != nil {
|
||||
return index.NewVectorPartitionIter(lookup)
|
||||
}
|
||||
return index.NewRangePartitionIter(ctx, t.DoltTable, lookup, t.isDoltFormat)
|
||||
return index.NewRangePartitionIter(ctx, t.DoltTable, lookup)
|
||||
}
|
||||
|
||||
func (t *WritableIndexedDoltTable) Partitions(ctx *sql.Context) (sql.PartitionIter, error) {
|
||||
@@ -166,7 +161,7 @@ func (t *WritableIndexedDoltTable) PartitionRows(ctx *sql.Context, part sql.Part
|
||||
return nil, err
|
||||
}
|
||||
if t.lb == nil || !canCache || t.lb.Key() != key {
|
||||
t.lb, err = index.NewIndexReaderBuilder(ctx, t.DoltTable, t.idx, key, t.projectedCols, t.sqlSch, t.isDoltFormat)
|
||||
t.lb, err = index.NewIndexReaderBuilder(ctx, t.DoltTable, t.idx, key, t.projectedCols, t.sqlSch)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -69,10 +69,10 @@ func newRowIterator(ctx context.Context, tbl *doltdb.Table, projCols []uint64, p
|
||||
}
|
||||
|
||||
func ProllyRowIterFromPartition(
|
||||
ctx context.Context,
|
||||
sch schema.Schema,
|
||||
projections []uint64,
|
||||
partition doltTablePartition,
|
||||
ctx context.Context,
|
||||
sch schema.Schema,
|
||||
projections []uint64,
|
||||
partition doltTablePartition,
|
||||
) (sql.RowIter, error) {
|
||||
rows, err := durable.ProllyMapFromIndex(partition.rowData)
|
||||
if err != nil {
|
||||
|
||||
@@ -1365,7 +1365,7 @@ func testSelectQuery(t *testing.T, test SelectTest) {
|
||||
expectedRows := unwrapRows(t, test.ExpectedRows)
|
||||
actualRows = unwrapRows(t, actualRows)
|
||||
// JSON columns must be compared using like so
|
||||
assert.Equal(t, len(expectedRows), len(actualRows))
|
||||
require.Equal(t, len(expectedRows), len(actualRows))
|
||||
for i := 0; i < len(expectedRows); i++ {
|
||||
assert.Equal(t, len(expectedRows[i]), len(actualRows[i]))
|
||||
for j := 0; j < len(expectedRows[i]); j++ {
|
||||
|
||||
@@ -66,10 +66,6 @@ func AssertFormat_DOLT(nbf *NomsBinFormat) {
|
||||
}
|
||||
}
|
||||
|
||||
func IsFormat_LD(nbf *NomsBinFormat) bool {
|
||||
return nbf.tag == formatTag_LD_1
|
||||
}
|
||||
|
||||
func GetFormatForVersionString(s string) (*NomsBinFormat, error) {
|
||||
if s == constants.FormatLD1String {
|
||||
return Format_LD_1, nil
|
||||
|
||||
Reference in New Issue
Block a user