mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-12 23:51:03 +00:00
Fix more of the SQL tests in dax (#2310)
There are now only four tests remaining which do not pass. One is related to error format mismatch. Two require orchestrator work. One won't pass until table name conversion is supported for multiple tables.
This commit is contained in:
parent
6740bc250e
commit
5bf5b5364d
3 changed files with 16 additions and 19 deletions
|
|
@ -144,7 +144,7 @@ func (q *Queryer) QuerySQL(ctx context.Context, qual dax.TableQualifier, sql str
|
|||
}
|
||||
schema.Fields[i] = &featurebase.WireQueryField{
|
||||
Name: dax.FieldName(col.ColumnName),
|
||||
Type: col.Type.TypeDescription(),
|
||||
Type: strings.ToLower(col.Type.TypeDescription()), // TODO(tlt): remove this once sql3 uses BaseTypes.
|
||||
BaseType: btype,
|
||||
TypeInfo: col.Type.TypeInfo(),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,23 +92,10 @@ func TestDAXIntegration(t *testing.T) {
|
|||
// skips is a list of tests which are currently not passing in dax. We
|
||||
// need to get these passing before alpha.
|
||||
skips := []string{
|
||||
"testinsert/test-5", // error messages differ
|
||||
"table-82/test-3",
|
||||
"table-82/test-8",
|
||||
"table-83/test-3",
|
||||
"table-83/test-8",
|
||||
"cast_int/test-2",
|
||||
"cast_int/test-7",
|
||||
"cast_id/test-2",
|
||||
"cast_string/test-12",
|
||||
"cast_ts/test-7",
|
||||
"sum_test/test-5",
|
||||
"percentile_test/test-6",
|
||||
"minmax_test/test-7",
|
||||
"minmax_test/test-8",
|
||||
"groupby_test/test-5",
|
||||
"groupby_test/test-6",
|
||||
"innerjointest/innerjoin-aggregate-groupby",
|
||||
"testinsert/test-5", // error messages differ
|
||||
"percentile_test/test-6", // related to TODO in orchestrator.executePercentile
|
||||
"groupby_test/test-6", // something to do with GroupCount.DecimalAgg=nil in orchestrator.executeGroupBy
|
||||
"innerjointest/innerjoin-aggregate-groupby", // join test which won't work until we support multiple tables
|
||||
}
|
||||
|
||||
doSkip := func(name string) bool {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import (
|
|||
"fmt"
|
||||
"log"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/molecula/featurebase/v3/dax"
|
||||
"github.com/molecula/featurebase/v3/pql"
|
||||
|
|
@ -144,11 +145,20 @@ func (s *WireQueryResponse) UnmarshalJSONTyped(in []byte, typed bool) error {
|
|||
}
|
||||
}
|
||||
|
||||
case dax.BaseTypeTimestamp:
|
||||
if src, ok := s.Data[i][j].(string); ok && src != "" {
|
||||
val, err := time.ParseInLocation(time.RFC3339Nano, src, time.UTC)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "parsing timestamp")
|
||||
}
|
||||
s.Data[i][j] = val
|
||||
}
|
||||
|
||||
case dax.BaseTypeBool, dax.BaseTypeString:
|
||||
// no need to convert
|
||||
|
||||
default:
|
||||
log.Printf("WARNING: unimplemented: %T", hdr.BaseType)
|
||||
log.Printf("WARNING: unimplemented: %s", hdr.BaseType)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue