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

#15 fix incorrect decoding to csv #61

Merged
merged 1 commit into from
Jan 7, 2023
Merged

Conversation

Tsovak
Copy link
Contributor

@Tsovak Tsovak commented Jan 5, 2023

resolves #15

input data from issie #15 has a h3 that actually is a big string array

with zipcode_geom as (
    SELECT
        ST_GEOGFROMTEXT(zipcode_geom) as geom,
        bqcarto.h3.ST_ASH3_POLYFILL(ST_GEOGFROMTEXT(zipcode_geom), 10) as h3,
        zipcode
    FROM `bigquery-public-data.utility_us.zipcode_area`
    WHERE city = 'Seattle city' and zipcode='98105'
)

select
 ARRAY_LENGTH(h3),
 *
FROM zipcode_geom

BQ decoder returns decoded data like map[string]interface{} in most cases, but in the current case, it returns as a string array for the h3 column. in line of 65 we return an error when couldn't cast to map, instead of that I added a type checker that added to the column any data like an array or just an interface.
Added the pic to make to more clear
image

Btw, in Google chrome, the column is seen, but in Safari isn't. I think it should be another issue
proofs
image

@delfrrr
Copy link
Contributor

delfrrr commented Jan 7, 2023

Indeed, I was able to reproduce, thank you for the fix!

@delfrrr delfrrr merged commit cab34c8 into dekart-xyz:main Jan 7, 2023
@Tsovak Tsovak deleted the issues-15 branch January 7, 2023 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cell is empty in when show table
2 participants