fix(sql-lab): relax column name restrictions (#10816)

This commit is contained in:
Ville Brofeldt
2020-09-10 07:54:37 +03:00
committed by GitHub
parent e6a4808cb7
commit 8a9ae811d0
3 changed files with 19 additions and 22 deletions

View File

@@ -94,13 +94,7 @@ describe('ExploreResultsButton', () => {
});
const badCols = wrapper.instance().getInvalidColumns();
expect(badCols).toEqual([
'COUNT(*)',
'1',
'123',
'CASE WHEN 1=1 THEN 1 ELSE 0 END',
'__TIMESTAMP',
]);
expect(badCols).toEqual(['my_dupe_col__2', '__timestamp', '__TIMESTAMP']);
const msgWrapper = shallow(wrapper.instance().renderInvalidColumnMessage());
expect(msgWrapper.find('div')).toHaveLength(1);

View File

@@ -326,6 +326,16 @@ export const queryWithBadColumns = {
name: '__TIME',
type: 'TIMESTAMP',
},
{
is_date: false,
name: 'my_dupe_col__2',
type: 'STRING',
},
{
is_date: true,
name: '__timestamp',
type: 'TIMESTAMP',
},
{
is_date: true,
name: '__TIMESTAMP',