- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for pathExpr (0.09 sec)
-
internal/s3select/sql/utils.go
var pathExpr []*JSONPathElement if hasTableAlias { pathExpr = e.PathExpr } else { pathExpr = make([]*JSONPathElement, len(e.PathExpr)+1) pathExpr[0] = &JSONPathElement{Key: &ObjectKey{ID: e.BaseKey}} copy(pathExpr[1:], e.PathExpr) } e.strippedTableAlias = tableAlias e.strippedPathExpr = pathExpr return e.strippedPathExpr }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Nov 10 16:12:50 UTC 2021 - 3.6K bytes - Viewed (0) -
internal/s3select/sql/evaluate.go
alias := tableAlias if tableAlias == "" { alias = baseTableName } pathExpr := e.StripTableAlias(alias) _, rawVal := r.Raw() switch rowVal := rawVal.(type) { case jstream.KVS, simdjson.Object: if len(pathExpr) == 0 { pathExpr = []*JSONPathElement{{Key: &ObjectKey{ID: e.BaseKey}}} } result, _, err := jsonpathEval(pathExpr, rowVal) if err != nil { return nil, err }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 12K bytes - Viewed (0) -
internal/s3select/sql/statement.go
if !strings.EqualFold(from.Table.BaseKey.String(), baseTableName) { return errBadTableName(errors.New("table name must be `s3object`")) } if len(from.Table.PathExpr) > 0 { if !from.Table.PathExpr[0].ArrayWildcard { return errBadTableName(errors.New("keypath table name is invalid - please check the service documentation")) } } return nil }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 8.9K bytes - Viewed (0) -
internal/s3select/sql/analysis.go
} return } func (e *In) analyze(s *Select) (result qProp) { switch { case e.JPathExpr != nil: // Check if the path expression is valid if len(e.JPathExpr.PathExpr) > 0 { if e.JPathExpr.BaseKey.String() != s.From.As && !strings.EqualFold(e.JPathExpr.BaseKey.String(), baseTableName) { result = qProp{err: errInvalidKeypath} return } }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Dec 23 07:19:11 UTC 2023 - 8.5K bytes - Viewed (0) -
internal/s3select/sql/jsonpath_test.go
recs, err := getJSONStructs(b) if err != nil || len(recs) != 3 { t.Fatalf("%v or length was not 3", err) } for j, rec := range recs { // fmt.Println(rec) r, _, err := jsonpathEval(jp.PathExpr, rec) if err != nil { t.Errorf("Error: %d %d %v", i, j, err) } if !reflect.DeepEqual(r, tc.res[j]) { fmt.Printf("%#v (%v) != %v (%v)\n", r, reflect.TypeOf(r), tc.res[j], reflect.TypeOf(tc.res[j]))
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 2.8K bytes - Viewed (0) -
internal/s3select/sql/parser.go
} // JSONPath represents a keypath. // Instances should be treated idempotent and not change once created. type JSONPath struct { BaseKey *Identifier `parser:" @@"` PathExpr []*JSONPathElement `parser:"(@@)*"` // Cached values: pathString string strippedTableAlias string strippedPathExpr []*JSONPathElement }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Jan 18 07:03:17 UTC 2024 - 12.9K bytes - Viewed (0) -
internal/s3select/sql/jsonpath.go
// If the value should be considered flat (from wildcards) any array returned should be considered individual values. func jsonpathEval(p []*JSONPathElement, v interface{}) (r interface{}, flat bool, err error) { // fmt.Printf("JPATHexpr: %v jsonobj: %v\n\n", p, v) if len(p) == 0 || v == nil { return v, false, nil } switch { case p[0].Key != nil: key := p[0].Key.keyString() switch kvs := v.(type) { case jstream.KVS:
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 3.5K bytes - Viewed (0)