question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Null Type can't be converted to Array

See original GitHub issue

I have ibis version ‘v0.8.1’ and I ran the following,

In [1]: import ibis

In [2]: t = ibis.table(ibis.schema([('a','string')]))

In [3]: t.mutate(b=ibis.null()).columns
Out[3]: ['a', 'b']

In [4]: t.mutate(b=ibis.null())['b']


AttributeError: module 'ibis.expr.types' has no attribute 'NullArray'

I can’t select NullArray by column name. Is this expected?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
cpcloudcommented, Jun 18, 2016

@napjon Added tests in the PR. To do what you’re talking about using your t1 and t2, here’s how you would do it:

In [1]: import ibis

In [2]: t1 = ibis.table(ibis.schema([('a','string'),('b','string')]))

In [3]: t2 = ibis.table(ibis.schema([('a','string')]))

In [4]: mutated = t2.mutate(b=ibis.NA.cast('string'))

In [5]: union = t1.union(mutated)
0reactions
napjoncommented, Jun 20, 2016

Got it, thanks @cpcloud!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Type 'null' cannot be used as an index type in Array.reduce ...
Type 'null' cannot be used as an index type for acc[item.mod] = The solution depends on what are you going to do with...
Read more >
Chapter 4. Types, Values, and Variables - Oracle Help Center
An object reference obj can be converted to a boolean , following the C language convention that any reference other than null is...
Read more >
Everything you wanted to know about $null - PowerShell
There are some types that do not have a valid conversion from $null . These types generate a Cannot convert null to type...
Read more >
cast function | Databricks on AWS
The result is a NULL of the specified numeric type. ... SELECT cast(array() AS STRING); [] > SELECT cast(map('hello', 1, 'world', null) AS ......
Read more >
Type Conversion Functions | ClickHouse Docs
NULL , if ClickHouse can't interpret the input string as a number or if the input number contains more than S decimal places....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found