MCPcopy Create free account
hub / github.com/apache/impala / test_binary_display

Method test_binary_display

tests/shell/test_shell_commandline.py:1303–1314  ·  view source on GitHub ↗

Test that binary values are displayed correctly.

(self, vector)

Source from the content-addressed store, hash-verified

1301 assert "| true | false |" in result.stdout, result.stdout
1302
1303 def test_binary_display(self, vector):
1304 """Test that binary values are displayed correctly."""
1305 query = "select binary_col from functional.binary_tbl"
1306 result = run_impala_shell_cmd(vector, ['-q', query])
1307 assert "| binary1 |" in result.stdout, result.stdout
1308 assert "| NULL |" in result.stdout, result.stdout
1309 assert "| |" in result.stdout, result.stdout
1310 assert "| árvíztűrőtükörfúró |" in result.stdout, result.stdout
1311 assert "| 你好hello |" in result.stdout, result.stdout
1312 # The last two output lines are malformed UTF-8 strings.
1313 assert "| " + utf8_encode_if_needed("\0�\0�") in result.stdout, result.stdout
1314 assert "| " + utf8_encode_if_needed("�D3\"") in result.stdout, result.stdout
1315
1316 def test_binary_as_string(self, vector):
1317 query = """select cast(binary_col as string) from functional.binary_tbl

Callers

nothing calls this directly

Calls 2

run_impala_shell_cmdFunction · 0.90
utf8_encode_if_neededFunction · 0.90

Tested by

no test coverage detected