mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
fix(sql-lab): relax column name restrictions (#10816)
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user