- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 17 for KVS (0.02 sec)
-
internal/config/config.go
} return s.String() } // KVS - is a shorthand for some wrapper functions // to operate on list of key values. type KVS []KV // Empty - return if kv is empty func (kvs KVS) Empty() bool { return len(kvs) == 0 } // Clone - returns a copy of the KVS func (kvs KVS) Clone() KVS { return append(make(KVS, 0, len(kvs)), kvs...) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Sep 03 18:23:41 UTC 2024 - 37.7K bytes - Viewed (0) -
internal/s3select/json/record.go
func (r *Record) Clone(dst sql.Record) sql.Record { other, ok := dst.(*Record) if !ok { other = &Record{} } if len(other.KVS) > 0 { other.KVS = other.KVS[:0] } other.KVS = append(other.KVS, r.KVS...) return other } // Set - sets the value for a column name. func (r *Record) Set(name string, value *sql.Value) (sql.Record, error) { var v interface{}
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 5.3K bytes - Viewed (0) -
internal/s3select/json/preader.go
// order) kvs = mv.Value.(jstream.KVS) } else { // To be AWS S3 compatible Select for JSON needs to // output non-object JSON as single column value // i.e. a map with `_1` as key and value as the // non-object. kvs = jstream.KVS{jstream.KV{Key: "_1", Value: mv.Value}} } all = append(all, kvs) } // We don't need the input any more.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 6.5K bytes - Viewed (0) -
internal/s3select/sql/jsonpath.go
} switch { case p[0].Key != nil: key := p[0].Key.keyString() switch kvs := v.(type) { case jstream.KVS: for _, kv := range kvs { if kv.Key == key { return jsonpathEval(p[1:], kv.Value) } } // Key not found - return nil result return Missing{}, false, nil case simdjson.Object: elem := kvs.FindKey(key, nil) if elem == nil { // Key not found - return nil result
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 3.5K bytes - Viewed (0) -
internal/s3select/json/reader.go
} return nil, io.EOF } var kvs jstream.KVS if v.ValueType == jstream.Object { // This is a JSON object type (that preserves key // order) kvs = v.Value.(jstream.KVS) } else { // To be AWS S3 compatible Select for JSON needs to // output non-object JSON as single column value // i.e. a map with `_1` as key and value as the // non-object. kvs = jstream.KVS{jstream.KV{Key: "_1", Value: v.Value}} }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 3.2K bytes - Viewed (0) -
internal/s3select/parquet/reader.go
return nil, err } return nil, errParquetParsingError(err) } kvs := jstream.KVS{} for _, col := range pr.r.Columns() { var value interface{} if v, ok := nextRow[col.FlatName()]; ok { value, err = convertFromAnnotation(col.Element(), v) if err != nil { return nil, errParquetParsingError(err) } } kvs = append(kvs, jstream.KV{Key: col.FlatName(), Value: value}) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 4.5K bytes - Viewed (0) -
internal/s3select/sql/statement.go
return nil, errDataSource(errors.New("path not supported")) } switch rec := rawVal.(type) { case jstream.KVS: txedRec, _, err := jsonpathEval(e.selectAST.From.Table.PathExpr[1:], rec) if err != nil { return nil, err } var kvs jstream.KVS switch v := txedRec.(type) { case jstream.KVS: kvs = v case []interface{}: recs := make([]*Record, len(v)) for i, val := range v {
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/csv/record.go
// WriteJSON - encodes to JSON data. func (r *Record) WriteJSON(writer io.Writer) error { var kvs jstream.KVS = make([]jstream.KV, 0, len(r.columnNames)) for i, cn := range r.columnNames { if i < len(r.csvRecord) { kvs = append(kvs, jstream.KV{Key: cn, Value: r.csvRecord[i]}) } } return json.NewEncoder(writer).Encode(kvs) } // Raw - returns the underlying data with format info.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 4.1K bytes - Viewed (0) -
internal/s3select/simdj/record.go
if err != nil { return nil, err } if cap(dst.KVS) < len(elems.Elements) { dst.KVS = make(jstream.KVS, 0, len(elems.Elements)) } for _, elem := range elems.Elements { v, err := sql.IterToValue(elem.Iter) if err != nil { v, err = elem.Iter.Interface() if err != nil { panic(err) } } dst.KVS = append(dst.KVS, jstream.KV{ Key: elem.Name, Value: v, }) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 5.4K bytes - Viewed (0) -
internal/s3select/jstream/decoder.go
Key string `json:"key"` Value interface{} `json:"value"` } // KVS - represents key values in an JSON object type KVS []KV // MarshalJSON - implements converting a KVS datastructure into a JSON // object with multiple keys and values. func (kvs KVS) MarshalJSON() ([]byte, error) { b := new(bytes.Buffer) b.Write([]byte("{")) for i, kv := range kvs { b.Write([]byte("\"" + kv.Key + "\"" + ":"))
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 13.5K bytes - Viewed (0)