Git Product home page Git Product logo

Comments (3)

hrbrmstr avatar hrbrmstr commented on June 9, 2024

@cgivre I noticed that the "metadata" field (and "columns") in the raw JSON out put seems to be on a single line. I'm sure I could answer this q via poking at some Drill Java code but was wondering if you know that said line will always be "a line" (i.e. never wrap). I'm asking b/c I have to do some serious gyrations to support 64-bit integers & would 💙 to be able to line-grep for the "metadata" & "columns" fields, extract it and build the necessary JSON Schema for RapidJSON from said metadata and column names without having to parse the full result set (since it'd mean parsing it twice O_o). The bigrquery package is able to do this as BigQuery's REST API separates query result schema return from query results return and I'm trying to riff as much as possible off of that package.

If not, I may just remove the rapidjsonr compiled bits and try to hack 64-bit integers from conforming mal-parsed (by jsonlite) doubles. i.e. write something like:

is_BIGINT <- function(col) {
  is.numeric(col) & 
    v>-2^53 & v<2^53 & 
    (floor(col) == ceiling(col))
}

and run that on a mal-parsed double columns to validate that it can, in fact, be converted on the R-side w/o running into conversion issues.

(or I could just 🤷‍♂️ and note that folks should use the ODBC driver access to Drill since it does support 64-bit integers)

from sergeant.

cgivre avatar cgivre commented on June 9, 2024

@hrbrmstr This is interesting. When I was testing this I used the Cocoa REST API tester and everything seemed to be on new lines (pretty printed).

screen shot 2019-01-02 at 11 58 21

If I'm understanding what you're trying to do, you'll need both the columns and the metadata arrays from the result. I'm wondering would this work for you?

Moving the metadata to occur after the columns, but before the rows in the response and that way you could just read through it either line by line or via grep until you hit the end of the metadata section. I think this would be pretty easy to do in Drill and not really have any other unanticipated side-effects.

from sergeant.

hrbrmstr avatar hrbrmstr commented on June 9, 2024

that def cld work. it'd be super easy to target them, then.

from sergeant.

Related Issues (20)

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.