by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Mar 13 01:52
    djspiewak unassigned #2683
  • Mar 13 01:52
    djspiewak unassigned #2680
  • Mar 13 01:52
    djspiewak unassigned #2679
  • Mar 13 01:52
    djspiewak unassigned #2678
  • Mar 13 01:52
    djspiewak unassigned #2317
  • Mar 13 01:52
    djspiewak unassigned #2677
  • Mar 13 01:52
    djspiewak unassigned #2189
  • Mar 13 01:52
    djspiewak unassigned #2115
  • Mar 13 01:52
    djspiewak unassigned #2086
  • Mar 13 01:52
    djspiewak unassigned #2079
  • Mar 13 01:52
    djspiewak unassigned #2075
  • Mar 13 01:52
    djspiewak unassigned #2070
  • Mar 13 01:52
    djspiewak unassigned #2067
  • Mar 13 01:52
    djspiewak unassigned #2051
  • Mar 13 01:52
    djspiewak unassigned #2066
  • Mar 13 01:52
    djspiewak unassigned #2046
  • Mar 13 01:52
    djspiewak unassigned #2034
  • Mar 13 01:52
    djspiewak unassigned #2025
  • Mar 13 01:52
    djspiewak unassigned #2033
  • Mar 13 01:52
    djspiewak unassigned #1892
SlamData
@slamdata-user
[Gary Burgess, SlamData Inc.] oh! actually I know why I have this expectation
[Gary Burgess, SlamData Inc.] afaik, it's impossible for mongo to have a collection that is not populated with objects
[Gary Burgess, SlamData Inc.] so (until now at least?) we have always get a list of records back when making queries
[Alissa Pajer, SlamData Inc.] In non-markdown SQL the query select distinct state from zips returns values like {"state": "CO"}, so the fact that that query is in a markdown query is changing the results?
[Gary Burgess, SlamData Inc.] but that not might be exactly the case for what happens with subqueries, etc.
[Alissa Pajer, SlamData Inc.] Hm, yeah it seems that subqueries are behaving differently than regular queries.
[Gary Burgess, SlamData Inc.] with the markdown query, it just picks the first key out of the returned records to populate the list values, so what it's returning may not be the best thing to compare with when using it as a subquery
[Gary Burgess, SlamData Inc.] it seems there is some magic currently, if I do a select state from zips it the endpoint returns this:
[
{ "value": "MA" },
{ "value": "MA" },
{ "value": "MA" },
{ "value": "MA" },
{ "value": "MA" },
{ "value": "MA" },
{ "value": "MA" },
{ "value": "MA" },
{ "value": "MA" },
{ "value": "MA" }
]
SlamData
@slamdata-user
[Alissa Pajer, SlamData Inc.] So with the markdown query, if one resulting row looked like {"state": "CO", "zip": 80305} then it would pick out the value "CO"?
[Gary Burgess, SlamData Inc.] yeah
[Alissa Pajer, SlamData Inc.] So, select state from zips should be returning instead {"state": "MA"} according to the SQL spec. If it's returning that in old mongo, then that's a bug (likely on the backend).
[Gary Burgess, SlamData Inc.] hmm, interesting, if I do select state as state from zips the key is actually called "state", so it's using that somehow to produce the result
[Gary Burgess, SlamData Inc.] I would hazard a guess that without the "as" it's projecting the values out, but since that's illegal for a mongo collection, it invents the key "value" for each result and wraps it in an object

[Gary Burgess, SlamData Inc.] another piece of evidence for that supposition... if I do:

SELECT t.state FROM (SELECT state AS state FROM zips) as t

I get { value: ... } records again, but if I do

SELECT t FROM (SELECT state AS state FROM zips) as t

then come through as { state: ... }

SlamData
@slamdata-user
[Alissa Pajer, SlamData Inc.] But without the as the results should still have the shape {"state": "MA"}
[John De Goes, SlamData Inc.] So it looks like we do implicit SELECT VALUE if there is a single unnamed value. Which is correct, although I didn't think we had implemented that. Which means MongoDB wraps in value because it can't return raw strings and we don't work around that particular limitation
[John De Goes, SlamData Inc.] We had a ticket to NOT box single unnamed columns in objects, I.e. Treat them as SELECT VALUE.
[Alissa Pajer, SlamData Inc.] @jdegoes that is correct? If there is a single unnamed value I thought it would still use the name. That means that select foo, bar from baz and select foo from baz return results of different shapes (the former an object, the latter just values), which seems very strange to me.
[Gary Burgess, SlamData Inc.] @natefaubion can probably comment more on the value boxing thing when he's around again. I think that's related to what we're talking about here, but I think it's problematic when there's another layer introduced or something, since we always get results as a list of records
[John De Goes, SlamData Inc.] We can revisit that decision. SQL auto boxes everything because the result set had to be a table. We don't have that limitation so autoboxing is also confusing sometimes, for example, IN (SELECT ...) queries can never work the way the user wants with auto boxing
[Gary Burgess, SlamData Inc.] oh, right yeah, the problematic case is when we get { value: { city: ..., state: ... } } instead of { city: ..., state: ... } sometimes in fact, I think
[John De Goes, SlamData Inc.] Another case: SELECT {"foo": ...} FROM .... user is confused because it's wrapped in "0"
[Gary Burgess, SlamData Inc.] is there an explicit SELECT VALUE then? I didn't know about that
SlamData
@slamdata-user
[John De Goes, SlamData Inc.] Yes, it was added later and not all dialects support it. But users will never think to try such a thing with IN and sub selects
[Gary Burgess, SlamData Inc.] that's true

[Alissa Pajer, SlamData Inc.] @garyb so I've been trying to run the markdown query

state = {!``SELECT DISTINCT(state) FROM `../patients.json` ORDER BY state`\`}

but it's giving me the error
```
The field state has the query:

SELECT DISTINCT(state) FROM ../patients.json ORDER BY state

Which failed to parse with the following error:

Expected EOF

Go back to the previous card and edit the query to fix this error.
`\
any idea what that means?

SlamData
@slamdata-user
[Alissa Pajer, SlamData Inc.] where the error title is: There was a problem populating a field based on a SQL² query.
[Gary Burgess, SlamData Inc.] looks like another bug in our SQL parser
[Nathan Faubion, SlamData Inc.] @alissa have you updated recently?
[Gary Burgess, SlamData Inc.] does
SELECT DISTINCT state FROM `../patients.json` ORDER BY state
[Gary Burgess, SlamData Inc.] work?
[Alissa Pajer, SlamData Inc.] @natefaubion I am running slamdata version 4.2.6, the latest one
[Gary Burgess, SlamData Inc.] I thought distinct applied to all the projections
[Nathan Faubion, SlamData Inc.] Before I fixed the parser everything returned EOF errors
[Alissa Pajer, SlamData Inc.] I get the same error when I remove the parentheses
[Nathan Faubion, SlamData Inc.] That query will parse in the current version we have test cases like that. It's probably failing because of the relative path which means you likely aren't using the latest assets for some reason
[Gary Burgess, SlamData Inc.] hmm, it worked in a query card for me as SELECT DISTINCT state FROM `../../zips` ORDER BY state
SlamData
@slamdata-user
[Alissa Pajer, SlamData Inc.] The query works for me as a query card but not as a markdown cad.
[Nathan Faubion, SlamData Inc.] @alissa also I removed all EOF errors from the parser anyway, so you definitely are not using there latest assets somehow
[Alissa Pajer, SlamData Inc.] @natefaubion ok thanks, I'll see what happened there

[Gary Burgess, SlamData Inc.] hmm, yeah there's something odd, I just tried exactly

state = {!``SELECT DISTINCT(state) FROM `../zips` ORDER BY state``}

too, and it is showing me a dropdown with the states when I show markdown

SlamData
@slamdata-user
[Alissa Pajer, SlamData Inc.] success with the markdown query now! I had to clear my browser cache for the new SlamData to load. Thanks @garyb for the idea.
SlamData
@slamdata-user

[github]
[slamdata/slamdata] New comment by Cmdv on issue #2071: Mimir as the default mount pointing to pre-baked examples we package. (assigned to Cmdv)
@damonLL

If we bake it in regardless, do we run the risk of overwriting existing mounts with the same name, or existing Mimir mounts pointing to the same physical directory?
my exact thoughts, that's why I wondered if giving a select box option (you get this with a lot of installers asking if you want demo content installed)

I'll just try and implement above as an option along with warning message.
installing demo content may overwrite any existing local mounts or something similar =D

SlamData
@slamdata-user
[github]
[slamdata/slamdata] New comment by beckyconning on pull request #2125: Added are you sure you want to leave this page dialog while unsaved changes (assigned to beckyconning)
@garyb please review : )
SlamData
@slamdata-user
[github]
[slamdata/slamdata] New comment by garyb on pull request #2125: Added are you sure you want to leave this page dialog while unsaved changes
Can we avoid this rename these? There's no need to import DOM.Event.Types as qualified when the EventType type is already imported unqualified (the line below). Just need to update it to import EventType(..) so we get the constructor too.
[github]
[slamdata/slamdata] New comment by beckyconning on pull request #2125: Added are you sure you want to leave this page dialog while unsaved changes
I often find it hard to locate where a constructor has come from when more than one types constructors have been imported using (..). Would you be okay with EventType(EventType) instead?
SlamData
@slamdata-user
[github]
[slamdata/slamdata] New comment by garyb on pull request #2125: Added are you sure you want to leave this page dialog while unsaved changes
EventType is a newtype and only has one constructor. Plus editors have goto definition ;). But it's up to you... we generally only use (..), partially because that's what the auto-importing/suggestions will go with too.

[github]
[slamdata/slamdata] Issue created by Cmdv
slamdata/slamdata#2128
Description

In filesystem if you add new folders in empty folder, it seems that the JS heap, nodes & listeners just continually increase. The UI becomes sluggish, but refreshing the page returns the ui to normal speed and though still a little slow reading large folder (to be expected) the rest of the filesytem is snappy :runner:

Reproduction guide

fileSystem -> mount mongo -> add empty folder -> navigate into folder and add as many folders as you see fit!!

Results

From doing a bit of profiling, I spotted that the function canonicalize from purescript-pathy has a lot of time spent in it but that is likely due to evaluation the paths.

Bellow is a screen shot of the profile and also the profile it self that can be loaded into Chrome devtools under the Performance tab =D

addingFoldersInFileSystem-profile.json.zip

screen shot 2017-08-25 at 12 13 08

SlamData
@slamdata-user

[github]
[slamdata/slamdata] New comment by beckyconning on pull request #2125: Added are you sure you want to leave this page dialog while unsaved changes
There is also TraverseCard(..) TraverseDeck(..) and Milliseconds(..). Although in this case its somewhat clear from the name there is no easy way just from reading to be sure which constructor is associated with which data type.

Goto definition certainly helps but I often read source on GitHub (often on my phone) which does not yet have this feature.

I dunno maybe its not that important but to me it seems that no more than one types constructors should be imported using (..). Maybe this is somewhat similar to the idea that no more than one modules values should be imported without a list of values to import or a qualification?

SlamData
@slamdata-user
[github]
[slamdata/slamdata] New comment by garyb on pull request #2125: Added are you sure you want to leave this page dialog while unsaved changes
Can we call this constTrueEventListener or alwaysTrueEventListener? Ideally we wouldn't export it at all, but then we'd have to faff around with adding an export list to this module, so nevermind!