- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 436 for jstream (0.09 sec)
-
internal/s3select/jstream/README.md
```go decoder := jstream.NewDecoder(f, 2).EmitKV() // enable KV streaming at a depth level of 2 ``` ``` jstream.KV{desc RGB} jstream.KV{colors [red green blue]} jstream.KV{desc CMYK} jstream.KV{colors [cyan magenta yellow black]} ``` ## Installing ```bash go get github.com/bcicen/jstream ``` ## Commandline
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/sql/jsonpath_test.go
"reflect" "testing" "github.com/alecthomas/participle" "github.com/minio/minio/internal/s3select/jstream" ) func getJSONStructs(b []byte) ([]interface{}, error) { dec := jstream.NewDecoder(bytes.NewBuffer(b), 0).ObjectAsKVS().MaxDepth(100) var result []interface{} for parsedVal := range dec.Stream() { result = append(result, parsedVal.Value) } if err := dec.Err(); err != nil { return nil, err }
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/csv/record.go
w.Flush() return w.Error() } // 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) }
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/json/preader.go
continue } dst, ok := r.kvDstPool.Get().([]jstream.KVS) if !ok { dst = make([]jstream.KVS, 0, 1000) } d := jstream.NewDecoder(bytes.NewBuffer(in.input), 0).ObjectAsKVS().MaxDepth(100) stream := d.Stream() all := dst[:0] for mv := range stream { var kvs jstream.KVS if mv.ValueType == jstream.Object { // This is a JSON object type (that preserves key
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/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/json/record.go
func (r *Record) Replace(k interface{}) error { v, ok := k.(jstream.KVS) if !ok { return fmt.Errorf("cannot replace internal data in json record with type %T", k) } r.KVS = v return nil } // NewRecord - creates new empty JSON record. func NewRecord(f sql.SelectObjectFormat) *Record { return &Record{ KVS: jstream.KVS{}, SelectFormat: f, } }
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/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/sql/jsonpath.go
// along with this program. If not, see <http://www.gnu.org/licenses/>. package sql import ( "errors" "github.com/minio/minio/internal/s3select/jstream" "github.com/minio/simdjson-go" ) var ( errKeyLookup = errors.New("Cannot look up key in non-object value") errIndexLookup = errors.New("Cannot look up array index in non-array value")
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/parquet/reader.go
} 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}) } // Reuse destination if we can.
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/simdj/record.go
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, }) } return dst, nil }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 5.4K bytes - Viewed (0)