Permalink
Browse files

Rename HeapTuple to Tuple

  • Loading branch information...
umitanuki committed Feb 6, 2013
1 parent 031be58 commit 09c6fd350380d9991f8e499110dc0a83d78b1434
Showing with 7 additions and 7 deletions.
  1. +3 −3 src/bigpot/access/common.go
  2. +4 −4 src/bigpot/executor/seqscan.go
@@ -61,7 +61,7 @@ type RelationScan struct {
File *os.File
}
-type HeapTuple interface {
+type Tuple interface {
Get(attnum int32) system.Datum
}
@@ -167,7 +167,7 @@ func (relation *Relation) BeginScan(keys []ScanKey) (*RelationScan, error) {
return scan, nil
}
-func (scan *RelationScan) Next() (HeapTuple, error) {
+func (scan *RelationScan) Next() (Tuple, error) {
outer: for {
values, err := scan.Reader.Read()
if err != nil {
@@ -178,7 +178,7 @@ func (scan *RelationScan) Next() (HeapTuple, error) {
return nil, nil
}
- tuple := HeapTuple(&CSVTuple{
+ tuple := Tuple(&CSVTuple{
Scan: scan,
Values: values,
})
@@ -5,12 +5,12 @@ import "bigpot/planner"
type Node interface {
Init()
- Exec() access.HeapTuple
+ Exec() access.Tuple
End()
}
type Scan interface {
- GetNext() access.HeapTuple
+ GetNext() access.Tuple
}
type SeqScan struct {
@@ -33,12 +33,12 @@ func (scan *SeqScan) Init() {
}
}
-func (scan *SeqScan) Exec() access.HeapTuple {
+func (scan *SeqScan) Exec() access.Tuple {
/* TODO: projection */
return scan.GetNext()
}
-func (scan *SeqScan) GetNext() access.HeapTuple {
+func (scan *SeqScan) GetNext() access.Tuple {
if tuple, err := scan.scan.Next(); err == nil {
return tuple
}

0 comments on commit 09c6fd3

Please sign in to comment.