Giter Club home page Giter Club logo

slice's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

slice's Issues

Documentation?

Is there a place where I can view documentation for this library? I see it used extensively in Presto, but I wouldn't know where to start if I wanted to use it in my own library. Is there a place we can see Slice's design and related software?

jol-core is GPL

Slice is ASLv2 licensed, but has jol-core as a hard dependency. jol-core is released under the GPL.

Do you have a plan to remove the dependence on jol-core? Is there some workaround to make airlift's zstd compressor work without the GPL code?

Missing negative array size check in `Slice#allocate`

This is a public method. Experience would be better if negative array size produced a user-friendly message, similar to the one we get for too large size.

https://github.com/airlift/slice/blob/master/src/main/java/io/airlift/slice/Slices.java#L83:L92

On negative size, throws

java.lang.NegativeArraySizeException: -2147483636
	at io.airlift.slice.Slices.allocate(Slices.java:91)
	at io.trino.execution.buffer.PageSerializer$WriteBuffer.<init>(PageSerializer.java:626)
	at io.trino.execution.buffer.PageSerializer$SerializedPageOutput.startPage(PageSerializer.java:154)
	at io.trino.execution.buffer.PageSerializer.serialize(PageSerializer.java:83)
	at io.trino.spiller.FileSingleStreamSpiller.writePages(FileSingleStreamSpiller.java:157)
	at io.trino.spiller.FileSingleStreamSpiller.lambda$spill$0(FileSingleStreamSpiller.java:123)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
	at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131)
	at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:76)
	at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)

Explicitly typed Slice

I consider using your library for API.
Unfortunately, Slice can't be explicitly typed.
If I write public Slice getValue(), user can't be sure whether it is a slice of bytes, ints or something else.
The same for parameters.
This information could be specified in doc. But we still lose type checking from the compiler.

Did you consider having several classes, for each primitive type?

I saw this comment, but, maybe, to avoid code duplication, you could have one template and a generator?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.