Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SAMPLE() with * weeds out string fields #7621

Closed
rkuchan opened this issue Nov 12, 2016 · 2 comments
Closed

SAMPLE() with * weeds out string fields #7621

rkuchan opened this issue Nov 12, 2016 · 2 comments

Comments

@rkuchan
Copy link
Contributor

rkuchan commented Nov 12, 2016

Bug report

nightly, Ubuntu

Steps to reproduce:

  1. Write some data
> use mydb
Using database mydb
> insert blah value=6
> insert blah cal=6
> insert blah boo="hi, how are you"
> SELECT * FROM blah
name: blah
time				boo		cal	value
----				---		---	-----
2016-11-11T23:56:26.051934756Z				6
2016-11-11T23:56:32.538336046Z			6
2016-11-11T23:57:44.541442213Z	hi, how are you
  1. Use * in the SAMPLE() function
> select sample(*,1) from blah
name: blah
time				sample_cal	sample_value
----				----------	------------
2016-11-11T23:56:26.051934756Z			6
2016-11-11T23:56:32.538336046Z	6

Expected behavior: [What you expected to happen]

Return a sample for the string field.

I'm actually not sure what I expect SAMPLE() with * to do. I specified 1 point but I'll end up with three points, technically.

Actual behavior: [What actually happened]

The string field is ignored in the results.

@jwilder
Copy link
Contributor

jwilder commented Nov 15, 2016

I think many of the functions ignore strings and booleans. cc @jsternberg @benbjohnson

@jsternberg
Copy link
Contributor

This is a problem with the wildcard expansion. It defaults to only supporting floats and integers and we have to whitelist other types for other functions. It's an easy fix, but also really easy to forget.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants